Enum cargo_platform::Platform[][src]

pub enum Platform {
    Name(String),
    Cfg(CfgExpr),
}

Platform definition.

Variants

Name(String)

A named platform, like x86_64-apple-darwin.

Cfg(CfgExpr)

A cfg expression, like cfg(windows).

Implementations

impl Platform[src]

pub fn matches(&self, name: &str, cfg: &[Cfg]) -> bool[src]

Returns whether the Platform matches the given target and cfg.

The named target and cfg values should be obtained from rustc.

pub fn check_cfg_attributes(&self, warnings: &mut Vec<String>)[src]

Trait Implementations

impl Clone for Platform[src]

impl Debug for Platform[src]

impl<'de> Deserialize<'de> for Platform[src]

impl Display for Platform[src]

impl Eq for Platform[src]

impl FromStr for Platform[src]

type Err = ParseError

The associated error which can be returned from parsing.

impl Hash for Platform[src]

impl Ord for Platform[src]

impl PartialEq<Platform> for Platform[src]

impl PartialOrd<Platform> for Platform[src]

impl Serialize for Platform[src]

impl StructuralEq for Platform[src]

impl StructuralPartialEq for Platform[src]

Auto Trait Implementations

impl RefUnwindSafe for Platform

impl Send for Platform

impl Sync for Platform

impl Unpin for Platform

impl UnwindSafe for Platform

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

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

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

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

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

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

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

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

type Error = Infallible

The type returned in the event of a conversion error.

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

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.