Struct predicates::path::FileTypePredicate [−][src]
pub struct FileTypePredicate { /* fields omitted */ }
Predicate that checks the std::fs::FileType
.
This is created by the predicate::path::is_file
, predicate::path::is_dir
, and predicate::path::is_symlink
.
Methods
impl FileTypePredicate
[src]
impl FileTypePredicate
pub fn follow_links(self, yes: bool) -> Self
[src]
pub fn follow_links(self, yes: bool) -> Self
Follow symbolic links.
When yes is true, symbolic links are followed as if they were normal directories and files.
Default: disabled.
pub fn from_path(path: &Path) -> Result<FileTypePredicate>
[src]
pub fn from_path(path: &Path) -> Result<FileTypePredicate>
Allow to create an FileTypePredicate
from a path
Trait Implementations
impl Debug for FileTypePredicate
[src]
impl Debug for FileTypePredicate
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 Clone for FileTypePredicate
[src]
impl Clone for FileTypePredicate
fn clone(&self) -> FileTypePredicate
[src]
fn clone(&self) -> FileTypePredicate
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 Copy for FileTypePredicate
[src]
impl Copy for FileTypePredicate
impl PartialEq for FileTypePredicate
[src]
impl PartialEq for FileTypePredicate
fn eq(&self, other: &FileTypePredicate) -> bool
[src]
fn eq(&self, other: &FileTypePredicate) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &FileTypePredicate) -> bool
[src]
fn ne(&self, other: &FileTypePredicate) -> bool
This method tests for !=
.
impl Eq for FileTypePredicate
[src]
impl Eq for FileTypePredicate
impl Predicate<Path> for FileTypePredicate
[src]
impl Predicate<Path> for FileTypePredicate
fn eval(&self, path: &Path) -> bool
[src]
fn eval(&self, path: &Path) -> bool
Execute this Predicate
against variable
, returning the resulting boolean. Read more
fn find_case<'a>(&'a self, expected: bool, variable: &Path) -> Option<Case<'a>>
[src]
fn find_case<'a>(&'a self, expected: bool, variable: &Path) -> Option<Case<'a>>
Find a case that proves this predicate as expected
when run against variable
.
impl PredicateReflection for FileTypePredicate
[src]
impl PredicateReflection for FileTypePredicate
ⓘImportant traits for Box<R>fn parameters<'a>(&'a self) -> Box<Iterator<Item = Parameter<'a>> + 'a>
[src]
fn parameters<'a>(&'a self) -> Box<Iterator<Item = Parameter<'a>> + 'a>
Parameters of the current Predicate
.
ⓘImportant traits for Box<R>fn children(&'a self) -> Box<Iterator<Item = Child<'a>> + 'a>
[src]
fn children(&'a self) -> Box<Iterator<Item = Child<'a>> + 'a>
Nested Predicate
s of the current Predicate
.
impl Display for FileTypePredicate
[src]
impl Display for FileTypePredicate
Auto Trait Implementations
impl Send for FileTypePredicate
impl Send for FileTypePredicate
impl Sync for FileTypePredicate
impl Sync for FileTypePredicate