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

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.

Methods

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() -> UnitFor[src]

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

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

Create a variant based on for_host setting.

When for_host is true, this clears panic_ok in a sticky fashion so that all its dependencies also have panic_ok=false.

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

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

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

Returns true if this unit is allowed to set the panic compiler flag.

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

All possible values, used by clean.

Trait Implementations

impl Copy for UnitFor[src]

impl PartialEq<UnitFor> for UnitFor[src]

impl Clone for UnitFor[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Eq for UnitFor[src]

impl Debug for UnitFor[src]

impl Hash for UnitFor[src]

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more

Auto Trait Implementations

impl Send for UnitFor

impl Sync for UnitFor

Blanket Implementations

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

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

type Owned = T

impl<T> From for T[src]

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

impl<T, U> TryInto 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> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Same for T

type Output = T

Should always be Self