Struct platforms::PlatformReq [−][src]
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]
impl PlatformReq
pub fn as_str(&self) -> &str
[src]
pub fn as_str(&self) -> &str
Borrow this platform requirement as a string slice
pub fn matches(&self, platform: &Platform) -> bool
[src]
pub fn matches(&self, platform: &Platform) -> bool
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]
pub fn matching_platforms(&self) -> Vec<Platform>
Expand glob expressions into a list of all known matching platforms
Trait Implementations
impl Clone for PlatformReq
[src]
impl Clone for PlatformReq
fn clone(&self) -> PlatformReq
[src]
fn clone(&self) -> PlatformReq
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Debug for PlatformReq
[src]
impl Debug for PlatformReq
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Eq for PlatformReq
[src]
impl Eq for PlatformReq
impl PartialEq for PlatformReq
[src]
impl PartialEq for PlatformReq
fn eq(&self, other: &PlatformReq) -> bool
[src]
fn eq(&self, other: &PlatformReq) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &PlatformReq) -> bool
[src]
fn ne(&self, other: &PlatformReq) -> bool
This method tests for !=
.
impl FromStr for PlatformReq
[src]
impl FromStr for PlatformReq
type Err = Error
The associated error which can be returned from parsing.
fn from_str(req_str: &str) -> Result<Self, Self::Err>
[src]
fn from_str(req_str: &str) -> Result<Self, Self::Err>
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 Send for PlatformReq
impl Sync for PlatformReq
impl Sync for PlatformReq