pub struct IterEnv<'a> {
pub path: &'a Path,
pub is_dir: bool,
pub index: &'a FileIndex,
}Expand description
Iteration context exposed to when: expressions through the
iter.* namespace. Built once per iterated entry by
for_each_* rules and threaded into both the outer
when_iter: filter and any nested rule’s when:.
Fields§
§path: &'a PathRelative path of the iterated entry (as walker reported).
is_dir: boolWhether the iterated entry is a directory. iter.has_file
only does meaningful work when this is true; for files
it returns false.
index: &'a FileIndexFile index, used by iter.has_file(pattern) to look up
children of the iterated path.
Trait Implementations§
impl<'a> Copy for IterEnv<'a>
Auto Trait Implementations§
impl<'a> Freeze for IterEnv<'a>
impl<'a> RefUnwindSafe for IterEnv<'a>
impl<'a> Send for IterEnv<'a>
impl<'a> Sync for IterEnv<'a>
impl<'a> Unpin for IterEnv<'a>
impl<'a> UnsafeUnpin for IterEnv<'a>
impl<'a> UnwindSafe for IterEnv<'a>
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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