pub struct Glob<'a> { /* private fields */ }
Expand description
A compiled glob expression.
This is returned by Root::glob
.
Implementations§
Source§impl<'a> Glob<'a>
impl<'a> Glob<'a>
Sourcepub fn matcher(&self) -> Matcher<'_>
pub fn matcher(&self) -> Matcher<'_>
Construct a new matcher over the compiled glob pattern.
§Examples
use relative_path_utils::Root;
let root = Root::new("src")?;
let glob = root.glob("**/*.rs");
let mut results = Vec::new();
for e in glob.matcher() {
results.push(e?);
}
results.sort();
assert_eq!(results, vec!["lib.rs", "main.rs"]);
Auto Trait Implementations§
impl<'a> Freeze for Glob<'a>
impl<'a> RefUnwindSafe for Glob<'a>
impl<'a> Send for Glob<'a>
impl<'a> Sync for Glob<'a>
impl<'a> Unpin for Glob<'a>
impl<'a> UnwindSafe for Glob<'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