Struct MatchOptions
struct MatchOptions { ... }
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.
impl Clone for MatchOptions
fn clone(self: &Self) -> MatchOptions
impl Copy for MatchOptions
impl Debug for MatchOptions
fn fmt(self: &Self, f: &mut $crate::fmt::Formatter<'_>) -> $crate::fmt::Result
impl Default for MatchOptions
fn default() -> MatchOptions
impl Eq for MatchOptions
impl Freeze for MatchOptions
impl Hash for MatchOptions
fn hash<__H: $crate::hash::Hasher>(self: &Self, state: &mut __H)
impl Ord for MatchOptions
fn cmp(self: &Self, other: &MatchOptions) -> $crate::cmp::Ordering
impl PartialEq for MatchOptions
fn eq(self: &Self, other: &MatchOptions) -> bool
impl PartialOrd for MatchOptions
fn partial_cmp(self: &Self, other: &MatchOptions) -> $crate::option::Option<$crate::cmp::Ordering>
impl RefUnwindSafe for MatchOptions
impl Send for MatchOptions
impl StructuralPartialEq for MatchOptions
impl Sync for MatchOptions
impl Unpin for MatchOptions
impl UnwindSafe for MatchOptions
impl<T> Any for MatchOptions
fn type_id(self: &Self) -> TypeId
impl<T> Borrow for MatchOptions
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for MatchOptions
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> CloneToUninit for MatchOptions
unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)
impl<T> From for MatchOptions
fn from(t: T) -> TReturns the argument unchanged.
impl<T> ToOwned for MatchOptions
fn to_owned(self: &Self) -> Tfn clone_into(self: &Self, target: &mut T)
impl<T, U> Into for MatchOptions
fn into(self: Self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom for MatchOptions
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for MatchOptions
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>