Struct platforms::platform::PlatformReq
source · pub struct PlatformReq(/* private fields */);
Expand description
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§
source§impl PlatformReq
impl PlatformReq
sourcepub fn matches(&self, platform: &Platform) -> bool
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.
sourcepub fn matching_platforms(&self) -> impl Iterator<Item = &Platform>
pub fn matching_platforms(&self) -> impl Iterator<Item = &Platform>
Expand glob expressions into a list of all known matching platforms
Trait Implementations§
source§impl Clone for PlatformReq
impl Clone for PlatformReq
source§fn clone(&self) -> PlatformReq
fn clone(&self) -> PlatformReq
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for PlatformReq
impl Debug for PlatformReq
source§impl Display for PlatformReq
impl Display for PlatformReq
source§impl FromStr for PlatformReq
impl FromStr for PlatformReq
source§impl PartialEq for PlatformReq
impl PartialEq for PlatformReq
source§fn eq(&self, other: &PlatformReq) -> bool
fn eq(&self, other: &PlatformReq) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for PlatformReq
impl StructuralPartialEq for PlatformReq
Auto Trait Implementations§
impl Freeze for PlatformReq
impl RefUnwindSafe for PlatformReq
impl Send for PlatformReq
impl Sync for PlatformReq
impl Unpin for PlatformReq
impl UnwindSafe for PlatformReq
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more