Struct clap_cargo::Workspace
source · #[non_exhaustive]pub struct Workspace {
pub package: Vec<String>,
pub workspace: bool,
pub all: bool,
pub exclude: Vec<String>,
}
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.package: Vec<String>
Package to process (see cargo help pkgid
)
workspace: bool
Process all packages in the workspace
all: bool
Process all packages in the workspace
exclude: Vec<String>
Exclude packages from being processed
Implementations§
source§impl Workspace
impl Workspace
sourcepub fn partition_packages<'m>(
&self,
meta: &'m Metadata
) -> (Vec<&'m Package>, Vec<&'m Package>)
Available on crate feature cargo_metadata
only.
pub fn partition_packages<'m>( &self, meta: &'m Metadata ) -> (Vec<&'m Package>, Vec<&'m Package>)
cargo_metadata
only.Partition workspace members into those selected and those excluded.
Notes:
- Requires the features
cargo_metadata
. - Requires not calling
MetadataCommand::no_deps
Trait Implementations§
source§impl Args for Workspace
impl Args for Workspace
source§fn group_id() -> Option<Id>
fn group_id() -> Option<Id>
Report the [
ArgGroup::id
][crate::ArgGroup::id] for this set of argumentssource§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
source§fn augment_args_for_update<'b>(__clap_app: Command) -> Command
fn augment_args_for_update<'b>(__clap_app: Command) -> Command
source§impl FromArgMatches for Workspace
impl FromArgMatches for Workspace
source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches ) -> Result<Self, Error>
source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches ) -> Result<(), Error>
Assign values from
ArgMatches
to self
.source§fn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches ) -> Result<(), Error>
Assign values from
ArgMatches
to self
.source§impl PartialEq<Workspace> for Workspace
impl PartialEq<Workspace> for Workspace
impl Eq for Workspace
impl StructuralEq for Workspace
impl StructuralPartialEq for Workspace
Auto Trait Implementations§
impl RefUnwindSafe for Workspace
impl Send for Workspace
impl Sync for Workspace
impl Unpin for Workspace
impl UnwindSafe for Workspace
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more