[][src]Struct platforms::PlatformReq

pub struct PlatformReq(_);

Platform requirements: glob-like expressions for matching Rust platforms as identified by a "target triple", e.g. i686-apple-darwin.

For a list of all valid platforms, "target triples", see:

https://doc.rust-lang.org/nightly/rustc/platform-support.html

Platforms can be grouped with simple globbing rules:

  • Start with wildcard: *-gnu
  • End with wildcard: x86_64-*
  • Start and end with wildcard: *windows*

Implementations

impl PlatformReq[src]

pub fn as_str(&self) -> &str[src]

Borrow this platform requirement as a string slice

pub fn matches(&self, platform: &Platform) -> bool[src]

Does this platform requirement match the given platform string?

This matcher accepts a platform "target triple" string ala x86_64-unknown-linux-gnu and matches it against this Platform, using simple glob like rules.

pub fn matching_platforms(&self) -> Vec<&'static Platform>[src]

Expand glob expressions into a list of all known matching platforms

Trait Implementations

impl Clone for PlatformReq[src]

impl Debug for PlatformReq[src]

impl Display for PlatformReq[src]

impl Eq for PlatformReq[src]

impl FromStr for PlatformReq[src]

type Err = Error

The associated error which can be returned from parsing.

fn from_str(req_str: &str) -> Result<PlatformReq, Error>[src]

Create a new platform requirement. Platforms support glob-like wildcards on the beginning and end, e.g. *windows*.

Must match at least one known Rust platform "target triple" (e.g. x86_64-unknown-linux-gnu) to be considered valid.

impl PartialEq<PlatformReq> for PlatformReq[src]

impl StructuralEq for PlatformReq[src]

impl StructuralPartialEq for PlatformReq[src]

Auto Trait Implementations

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> 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.