Struct cargo::core::profiles::UnitFor [−][src]
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]
fn hash<__H: Hasher>(&self, state: &mut __H)[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, 1.3.0[src]
H: Hasher,
impl Ord for UnitFor[src]
fn cmp(&self, other: &UnitFor) -> Ordering[src]
#[must_use]pub fn max(self, other: Self) -> Self1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self1.50.0[src]
impl PartialEq<UnitFor> for UnitFor[src]
impl PartialOrd<UnitFor> for UnitFor[src]
fn partial_cmp(&self, other: &UnitFor) -> Option<Ordering>[src]
#[must_use]pub fn lt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]pub fn le(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]pub fn gt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]pub fn ge(&self, other: &Rhs) -> bool1.0.0[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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> Same<T> for T[src]
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn clone_into(&self, target: &mut T)[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> 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.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>, [src]
V: MultiLane<T>,