pub struct Pattern {
pub glob: String,
pub original: String,
pub source: Source,
pub effect: PatternEffect,
pub relativity: PatternRelativity,
pub path_kind: PathKind,
}Expand description
Pattern is generic and could be an instance of String, Glob, Regex or any other object.
The type is evolved by compiling.
A pattern can start its life as Pattern<String> and can be compiled into Pattern<Glob> or
Pattern<Regex>.
Fields§
§glob: StringThe pattern type
original: StringThe original string that defines the pattern
source: SourceWhere did we get this pattern?
effect: PatternEffectIs this ignore or whitelist pattern?
relativity: PatternRelativityDoes it have an implied prefix?
path_kind: PathKindIs the path a directory or anything?
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Pattern
impl RefUnwindSafe for Pattern
impl Send for Pattern
impl Sync for Pattern
impl Unpin for Pattern
impl UnwindSafe for Pattern
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> 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