[−][src]Struct krates::Cmd
An alternative to cargo_metadata::MetadataCommand which allows correct feature usage, as well as ensuring that the command can run successfully regardless of where it is executed and on what.
Methods
impl Cmd
[src]
pub fn new() -> Self
[src]
pub fn cargo_path(&mut self, path: impl Into<PathBuf>) -> &mut Self
[src]
Path to cargo
executable. If not set, this will use the
the $CARGO
environment variable, and if that is not set, will
simply be cargo
.
pub fn manifest_path(&mut self, path: impl Into<PathBuf>) -> &mut Self
[src]
Path to a Cargo.toml
manifest
pub fn current_dir(&mut self, path: impl Into<PathBuf>) -> &mut Self
[src]
Current directory of the cargo metadata
process.
pub fn no_default_features(&mut self) -> &mut Self
[src]
Disables default features.
NOTE: This has no effect if used on a workspace. You must specify a working directory or manifest path to a specific crate if used on a crate inside a workspace.
pub fn all_features(&mut self) -> &mut Self
[src]
Enables all features for all workspace crates. Usable on both individual crates and on an entire workspace.
pub fn features(&mut self, feats: impl IntoIterator<Item = String>) -> &mut Self
[src]
Enables specific features. See the NOTE for no_default_features
pub fn other_options(
&mut self,
options: impl IntoIterator<Item = String>
) -> &mut Self
[src]
&mut self,
options: impl IntoIterator<Item = String>
) -> &mut Self
Arbitrary command line flags to pass to cargo
. These will be added
to the end of the command line invocation.
Trait Implementations
impl Debug for Cmd
[src]
impl Default for Cmd
[src]
impl Into<MetadataCommand> for Cmd
[src]
fn into(self) -> MetadataCommand
[src]
Auto Trait Implementations
impl RefUnwindSafe for Cmd
impl Send for Cmd
impl Sync for Cmd
impl Unpin for Cmd
impl UnwindSafe for Cmd
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,