pub struct CargoOptions {
pub common: HashMap<&'static str, OptionMetadata>,
pub run: HashMap<&'static str, OptionMetadata>,
pub test: HashMap<&'static str, OptionMetadata>,
pub build: HashMap<&'static str, OptionMetadata>,
pub check: HashMap<&'static str, OptionMetadata>,
pub bench: HashMap<&'static str, OptionMetadata>,
}Expand description
Catalog of all cargo options
Fields§
§common: HashMap<&'static str, OptionMetadata>Common options for all cargo commands
run: HashMap<&'static str, OptionMetadata>cargo run specific options
test: HashMap<&'static str, OptionMetadata>cargo test specific options
build: HashMap<&'static str, OptionMetadata>cargo build specific options
check: HashMap<&'static str, OptionMetadata>cargo check specific options
bench: HashMap<&'static str, OptionMetadata>cargo bench specific options
Implementations§
Source§impl CargoOptions
impl CargoOptions
Sourcepub fn get_option(&self, command: &str, option: &str) -> Option<&OptionMetadata>
pub fn get_option(&self, command: &str, option: &str) -> Option<&OptionMetadata>
Get option metadata for a specific command
Sourcepub fn is_valid_option(&self, command: &str, option: &str) -> bool
pub fn is_valid_option(&self, command: &str, option: &str) -> bool
Check if an option is valid for a command
Sourcepub fn get_all_options(&self, command: &str) -> HashSet<&'static str>
pub fn get_all_options(&self, command: &str) -> HashSet<&'static str>
Get all valid options for a command
Auto Trait Implementations§
impl Freeze for CargoOptions
impl RefUnwindSafe for CargoOptions
impl Send for CargoOptions
impl Sync for CargoOptions
impl Unpin for CargoOptions
impl UnwindSafe for CargoOptions
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