[][src]Enum cargo::core::compiler::CompileKind

pub enum CompileKind {
    Host,
    Target(CompileTarget),
}

Indicator for how a unit is being compiled.

This is used primarily for organizing cross compilations vs host compilations, where cross compilations happen at the request of --target and host compilations happen for things like build scripts and procedural macros.

Variants

Host

Attached to a unit that is compiled for the "host" system or otherwise is compiled without a --target flag. This is used for procedural macros and build scripts, or if the --target flag isn't passed.

Attached to a unit to be compiled for a particular target. This is used for units when the --target flag is passed.

Implementations

impl CompileKind[src]

pub fn is_host(&self) -> bool[src]

pub fn for_target(self, target: &Target) -> CompileKind[src]

pub fn from_requested_targets(
    config: &Config,
    targets: &[String]
) -> CargoResult<Vec<CompileKind>>
[src]

Creates a new list of CompileKind based on the requested list of targets.

If no targets are given then this returns a single-element vector with CompileKind::Host.

Trait Implementations

impl Clone for CompileKind[src]

impl Copy for CompileKind[src]

impl Debug for CompileKind[src]

impl Eq for CompileKind[src]

impl Hash for CompileKind[src]

impl Ord for CompileKind[src]

impl PartialEq<CompileKind> for CompileKind[src]

impl PartialOrd<CompileKind> for CompileKind[src]

impl Serialize for CompileKind[src]

impl StructuralEq for CompileKind[src]

impl StructuralPartialEq for CompileKind[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> Same<T> for T

type Output = T

Should always be Self

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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,