[][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://forge.rust-lang.org/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*

Methods

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<Platform>
[src]

Expand glob expressions into a list of all known matching platforms

Trait Implementations

impl PartialEq<PlatformReq> for PlatformReq
[src]

impl Eq for PlatformReq
[src]

impl Clone for PlatformReq
[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug 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<Self, Self::Err>
[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.

Auto Trait Implementations

impl Send for PlatformReq

impl Sync for PlatformReq

Blanket Implementations

impl<T> From for T
[src]

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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

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

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

type Owned = T