[][src]Enum cargo_rustc_cfg::CargoTarget

pub enum CargoTarget {
    Benchmark(OsString),
    Binary(OsString),
    Example(OsString),
    Library,
    Test(OsString),
}

The various types of Cargo targets.

The default variant is Library.

This should not be confused with Rust compiler (rustc) targets, which are typically represented by a "triple" string. Cargo targets are defined and listed in a package's manifest (Cargo.toml).

Variants

Benchmark(OsString)

A --bench <NAME> Cargo target as defined in the package's manifest (Cargo.toml).

Binary(OsString)

A --bin <NAME> Cargo target as defined in the package's manifest (Cargo.toml).

Example(OsString)

An --example <NAME> Cargo target as defined in the package's manifest (Cargo.toml).

Library

The default Cargo target.

Test(OsString)

A --test <NAME> Cargo target as defined in the package's manifest (Cargo.toml).

Implementations

impl CargoTarget[src]

pub fn to_args(&self) -> Vec<&OsStr>[src]

Converts the Cargo target into the command line arguments for Cargo.

pub fn into_args(self) -> Vec<OsString>[src]

Consumes the Cargo target to convert into the command line arguments for Cargo.

Trait Implementations

impl Clone for CargoTarget[src]

impl Debug for CargoTarget[src]

impl Default for CargoTarget[src]

impl PartialEq<CargoTarget> for CargoTarget[src]

impl StructuralPartialEq for CargoTarget[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

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

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.