pub struct Target {
pub components: Vec<Pattern>,
pub kind: Option<SimpleFileKind>,
}Expand description
A path to reclaim, relative to the directory whose markers matched.
Components are matched one directory level at a time, so a target may reach into a
subdirectory – .angular/cache reclaims only the cache, not the whole .angular
directory. Every component is a glob, which is what makes cmake-build-* expressible.
Fields§
§components: Vec<Pattern>§kind: Option<SimpleFileKind>The kind the entry must have, or None to accept any.
Implementations§
Source§impl Target
impl Target
Sourcepub fn directory(path: &str) -> Result<Self, PatternError>
pub fn directory(path: &str) -> Result<Self, PatternError>
A target that reclaims a directory at path, relative to the project directory.
Sourcepub fn file(path: &str) -> Result<Self, PatternError>
pub fn file(path: &str) -> Result<Self, PatternError>
A target that reclaims a file at path, relative to the project directory.
Sourcepub fn any(path: &str) -> Result<Self, PatternError>
pub fn any(path: &str) -> Result<Self, PatternError>
A target that reclaims whatever is at path, whether file, directory or symlink.
Trait Implementations§
impl Eq for Target
impl StructuralPartialEq for Target
Auto Trait Implementations§
impl Freeze for Target
impl RefUnwindSafe for Target
impl Send for Target
impl Sync for Target
impl Unpin for Target
impl UnsafeUnpin for Target
impl UnwindSafe for Target
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