pub struct DefaultPredicateEnv { /* private fields */ }Expand description
Production PredicateEnv backed by the real OS.
Implementations§
Trait Implementations§
Source§impl Default for DefaultPredicateEnv
impl Default for DefaultPredicateEnv
Source§impl PredicateEnv for DefaultPredicateEnv
impl PredicateEnv for DefaultPredicateEnv
Source§fn platform(&self) -> Platform
fn platform(&self) -> Platform
The platform to match
platform:linux / platform:macos /
platform:windows against.Source§fn env(&self, var: &str) -> Option<String>
fn env(&self, var: &str) -> Option<String>
Look up an environment variable. Returns
None when the variable is
not set (as opposed to set-but-empty, which returns Some("")).Source§fn command_exists(&self, name: &str) -> bool
fn command_exists(&self, name: &str) -> bool
Returns
true when name is found on PATH.Source§fn file_exists(&self, path: &Path) -> bool
fn file_exists(&self, path: &Path) -> bool
Returns
true when path exists on the filesystem.Auto Trait Implementations§
impl Freeze for DefaultPredicateEnv
impl RefUnwindSafe for DefaultPredicateEnv
impl Send for DefaultPredicateEnv
impl Sync for DefaultPredicateEnv
impl Unpin for DefaultPredicateEnv
impl UnsafeUnpin for DefaultPredicateEnv
impl UnwindSafe for DefaultPredicateEnv
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more