pub struct PatternWord { /* private fields */ }
Expand description
A word which includes patterns. We don’t expand words
into the Vec<String>
directly since the patterns has
two different meanings: path glob and match in case
.
Implementations§
Source§impl PatternWord
impl PatternWord
pub fn new(fragments: Vec<LiteralOrGlob>) -> PatternWord
pub fn fragments(&self) -> &[LiteralOrGlob]
Sourcepub fn into_string(self) -> String
pub fn into_string(self) -> String
Returns a string. Pattern characters such as *
are treated as a literal.
pub fn expand_glob(self) -> Result<Vec<String>, Error>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PatternWord
impl RefUnwindSafe for PatternWord
impl Send for PatternWord
impl Sync for PatternWord
impl Unpin for PatternWord
impl UnwindSafe for PatternWord
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