[][src]Struct cargo_valgrind::Cargo

pub struct Cargo { /* fields omitted */ }

A cargo build command.

This type acts as a sentinel for a cargo build process. It allows the configuration via the new() function in a builder pattern style.

Methods

impl Cargo[src]

pub fn new() -> Manifest[src]

Start configuring the cargo command that will build the selected target.

pub fn build(&self) -> Result<(), Error>[src]

Build the selected target with the previously specified configuration.

This invokes cargo and builds the specified target. The crate is specified by the path to the Cargo.toml using the manifest field. The kind of build (debug or release) is selected via the build field. The binary to build is specified via the target field.

Errors

This function returns an error, if the cargo command returned an error, e.g. because the manifest could not be found or a target is not available.

pub fn feature<S: Into<String>>(self, feature: S) -> Self[src]

Build the target with a specific feature enabled.

This function can be called multiple times to build with multiple features enabled.

pub fn features<S, I>(self, features: I) -> Self where
    S: Into<String>,
    I: IntoIterator<Item = S>, 
[src]

Build the target with specific features enabled.

This function can be called multiple times and mixed with the feature() method.

Auto Trait Implementations

impl Sync for Cargo

impl Unpin for Cargo

impl Send for Cargo

impl UnwindSafe for Cargo

impl RefUnwindSafe for Cargo

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]