[−][src]Struct cargo::core::profiles::UnitFor
Flags used in creating Unit
s 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(&self) -> 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]
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Same for T
type Output = T
Should always be Self