Struct cargo::core::profiles::UnitFor[][src]

pub struct UnitFor { /* fields omitted */ }

Flags used in creating Units to indicate the purpose for the target, and to ensure the target’s dependencies have the correct settings.

Implementations

impl UnitFor[src]

pub fn new_normal() -> UnitFor[src]

A unit for a normal target/dependency (i.e., not custom build, proc macro/plugin, or test/bench).

pub fn new_build() -> UnitFor[src]

A unit for a custom build script or its dependencies.

pub fn new_compiler() -> UnitFor[src]

A unit for a proc macro or compiler plugin or their dependencies.

pub fn new_test(config: &Config) -> UnitFor[src]

A unit for a test/bench target or their dependencies.

Note that config is taken here for unstable CLI features to detect whether panic=abort is supported for tests. Historical versions of rustc did not support this, but newer versions do with an unstable compiler flag.

pub fn with_for_host(self, for_host: bool) -> UnitFor[src]

Creates a variant based on for_host setting.

When for_host is true, this clears panic_abort_ok in a sticky fashion so that all its dependencies also have panic_abort_ok=false. This’ll help ensure that once we start compiling for the host platform (build scripts, plugins, proc macros, etc) we’ll share the same build graph where everything is panic=unwind.

pub fn is_build(self) -> bool[src]

Returns true if this unit is for a custom build script or one of its dependencies.

pub fn all_values() -> &'static [UnitFor][src]

All possible values, used by clean.

Trait Implementations

impl Clone for UnitFor[src]

impl Copy for UnitFor[src]

impl Debug for UnitFor[src]

impl Eq for UnitFor[src]

impl Hash for UnitFor[src]

impl Ord for UnitFor[src]

impl PartialEq<UnitFor> for UnitFor[src]

impl PartialOrd<UnitFor> for UnitFor[src]

impl StructuralEq for UnitFor[src]

impl StructuralPartialEq for UnitFor[src]

Auto Trait Implementations

impl RefUnwindSafe for UnitFor

impl Send for UnitFor

impl Sync for UnitFor

impl Unpin for UnitFor

impl UnwindSafe for UnitFor

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[src]

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>, 
[src]