pub struct GlobPattern {
pub pattern: String,
pub case_sensitive: bool,
pub literal_separator: bool,
pub backslash_escape: bool,
pub require_literal_separator: bool,
pub require_literal_leading_dot: bool,
}
Expand description
Individual glob pattern with metadata
Fields§
§pattern: String
§case_sensitive: bool
§literal_separator: bool
§backslash_escape: bool
§require_literal_separator: bool
§require_literal_leading_dot: bool
Implementations§
Source§impl GlobPattern
impl GlobPattern
Sourcepub fn with_options(pattern: &str, options: &GlobOptions) -> Result<Self>
pub fn with_options(pattern: &str, options: &GlobOptions) -> Result<Self>
Create a new glob pattern with specific options
Sourcepub fn matches<P: AsRef<Path>>(&self, path: P) -> Result<bool>
pub fn matches<P: AsRef<Path>>(&self, path: P) -> Result<bool>
Check if this pattern matches a path
Sourcepub fn is_literal(&self) -> bool
pub fn is_literal(&self) -> bool
Check if this is a literal (non-glob) pattern
Trait Implementations§
Source§impl Clone for GlobPattern
impl Clone for GlobPattern
Source§fn clone(&self) -> GlobPattern
fn clone(&self) -> GlobPattern
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for GlobPattern
impl Debug for GlobPattern
Source§impl<'de> Deserialize<'de> for GlobPattern
impl<'de> Deserialize<'de> for GlobPattern
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for GlobPattern
impl RefUnwindSafe for GlobPattern
impl Send for GlobPattern
impl Sync for GlobPattern
impl Unpin for GlobPattern
impl UnwindSafe for GlobPattern
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