Enum cfg_expr::expr::TargetPredicate [−][src]
All predicates that pertains to a target, except for target_feature
Variants
Arch(Arch<'a>)Endian(Endian)Env(Env<'a>)Family(Family)target_family
This also applies to the bare unix and windows
predicates.
Os(Os<'a>)PointerWidth(u8)Vendor(Vendor<'a>)Implementations
impl<'a> TargetPredicate<'a>[src]
pub fn matches<T>(self, target: &T) -> bool where
T: TargetMatcher, [src]
T: TargetMatcher,
Returns true of the predicate matches the specified target
use cfg_expr::{targets::*, expr::TargetPredicate as tp}; let win = get_builtin_target_by_triple("x86_64-pc-windows-msvc").unwrap(); assert!( tp::Arch(Arch::x86_64).matches(win) && tp::Endian(Endian::little).matches(win) && tp::Env(Env::msvc).matches(win) && tp::Family(Family::windows).matches(win) && tp::Os(Os::windows).matches(win) && tp::PointerWidth(64).matches(win) && tp::Vendor(Vendor::pc).matches(win) );
Trait Implementations
impl<'a> Clone for TargetPredicate<'a>[src]
fn clone(&self) -> TargetPredicate<'a>[src]
pub fn clone_from(&mut self, source: &Self)1.0.0[src]
impl<'a> Copy for TargetPredicate<'a>[src]
impl<'a> Debug for TargetPredicate<'a>[src]
impl<'a> PartialEq<TargetPredicate<'a>> for TargetPredicate<'a>[src]
fn eq(&self, other: &TargetPredicate<'a>) -> bool[src]
fn ne(&self, other: &TargetPredicate<'a>) -> bool[src]
impl<'a> StructuralPartialEq for TargetPredicate<'a>[src]
Auto Trait Implementations
impl<'a> RefUnwindSafe for TargetPredicate<'a>
impl<'a> Send for TargetPredicate<'a>
impl<'a> Sync for TargetPredicate<'a>
impl<'a> Unpin for TargetPredicate<'a>
impl<'a> UnwindSafe for TargetPredicate<'a>
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> 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>,