Enum cargo::core::compiler::CompileKind [−][src]
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
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.
Target(CompileTarget)
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 short_name(&self, bcx: &BuildContext<'_, '_>) -> &str
[src]
Returns a “short” name for this kind, suitable for keying off configuration in Cargo or presenting to users.
Trait Implementations
impl Clone for CompileKind
[src]
fn clone(&self) -> CompileKind
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for CompileKind
[src]
impl Debug for CompileKind
[src]
impl Eq for CompileKind
[src]
impl Hash for CompileKind
[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 CompileKind
[src]
fn cmp(&self, other: &CompileKind) -> Ordering
[src]
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]
impl PartialEq<CompileKind> for CompileKind
[src]
fn eq(&self, other: &CompileKind) -> bool
[src]
fn ne(&self, other: &CompileKind) -> bool
[src]
impl PartialOrd<CompileKind> for CompileKind
[src]
fn partial_cmp(&self, other: &CompileKind) -> Option<Ordering>
[src]
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl Serialize for CompileKind
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl StructuralEq for CompileKind
[src]
impl StructuralPartialEq for CompileKind
[src]
Auto Trait Implementations
impl RefUnwindSafe for CompileKind
impl Send for CompileKind
impl Sync for CompileKind
impl Unpin for CompileKind
impl UnwindSafe for CompileKind
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>,