[−][src]Struct platforms::platform::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]
fn clone(&self) -> PlatformReq
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[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]
fn eq(&self, other: &PlatformReq) -> bool
[src]
fn ne(&self, other: &PlatformReq) -> bool
[src]
impl StructuralEq for PlatformReq
[src]
impl StructuralPartialEq for PlatformReq
[src]
Auto Trait Implementations
impl RefUnwindSafe for PlatformReq
impl Send for PlatformReq
impl Sync for PlatformReq
impl Unpin for PlatformReq
impl UnwindSafe for PlatformReq
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,
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.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
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.
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>,