pub struct PatternSet { /* private fields */ }Implementations§
Source§impl PatternSet
impl PatternSet
Sourcepub fn new<'a>(
patterns: impl IntoIterator<Item = &'a str>,
) -> Result<PatternSet, PatternError>
pub fn new<'a>( patterns: impl IntoIterator<Item = &'a str>, ) -> Result<PatternSet, PatternError>
Create a new matcher from a list of patterns.
Patterns can contain
*to match any sequence of characters (including empty sequence)?to match any single character- any other character to match itself
§Errors
Returns an error if any pattern is invalid.
Auto Trait Implementations§
impl Freeze for PatternSet
impl RefUnwindSafe for PatternSet
impl Send for PatternSet
impl Sync for PatternSet
impl Unpin for PatternSet
impl UnsafeUnpin for PatternSet
impl UnwindSafe for PatternSet
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