Struct MatchOptions
pub struct MatchOptions { pub case_sensitive: bool, pub require_literal_separator: bool, pub require_literal_leading_dot: bool }
Configuration options to modify the behaviour of Pattern::matches_with(..).
Fields
case_sensitive: boolWhether or not patterns should be matched in a case-sensitive manner. This currently only considers upper/lower case relationships between ASCII characters, but in future this might be extended to work with Unicode.
require_literal_separator: boolWhether or not path-component separator characters (e.g.
/on Posix) must be matched by a literal/, rather than by*or?or[...].require_literal_leading_dot: boolWhether or not paths that contain components that start with a
.will require that.appears literally in the pattern;*,?,**, or[...]will not match. This is useful because such files are conventionally considered hidden on Unix systems and it might be desirable to skip them when listing files.
Implementations
impl MatchOptions
fn new() -> SelfConstructs a new
MatchOptionswith default field values. This is used when calling functions that do not take an explicitMatchOptionsparameter.This function always returns this value:
MatchOptionsNote
The behavior of this method doesn't match
default()'s. This returnscase_sensitiveastruewhiledefault()does it asfalse.
Trait Implementations
impl Clone for MatchOptions
fn clone(&self) -> MatchOptions
impl Copy for MatchOptions
impl Debug for MatchOptions
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl Default for MatchOptions
fn default() -> MatchOptions
impl Eq for MatchOptions
impl Hash for MatchOptions
fn hash<__H: Hasher>(&self, state: &mut __H)
impl Ord for MatchOptions
fn cmp(&self, other: &MatchOptions) -> Ordering
impl PartialEq for MatchOptions
fn eq(&self, other: &MatchOptions) -> bool
impl PartialOrd for MatchOptions
fn partial_cmp(&self, other: &MatchOptions) -> Option<Ordering>
impl StructuralPartialEq for MatchOptions
Auto Trait Implementations
impl Freeze for MatchOptions
impl RefUnwindSafe for MatchOptions
impl Send for MatchOptions
impl Sync for MatchOptions
impl Unpin for MatchOptions
impl UnsafeUnpin for MatchOptions
impl UnwindSafe for MatchOptions
Blanket Implementations
impl<T> Any for MatchOptions
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for MatchOptions
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for MatchOptions
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> CloneToUninit for MatchOptions
where
T: Clone,
unsafe fn clone_to_uninit(&self, dest: *mut u8)
impl<T> From<T> for MatchOptions
fn from(t: T) -> TReturns the argument unchanged.
impl<T> ToOwned for MatchOptions
where
T: Clone,
type Owned = T;fn to_owned(&self) -> Tfn clone_into(&self, target: &mut T)
impl<T, U> Into<U> for MatchOptions
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for MatchOptions
where
U: Into<T>,
type Error = never;fn try_from(value: U) -> Result<T, never>
impl<T, U> TryInto<U> for MatchOptions
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>