pub enum ErrorKind {
InvalidRecursive,
UnclosedClass,
InvalidRange(char, char),
UnopenedAlternates,
UnclosedAlternates,
NestedAlternates,
DanglingEscape,
Regex(String),
// some variants omitted
}
Expand description
The kind of error that can occur when parsing a glob pattern.
Variants
InvalidRecursive
DEPRECATED.
This error used to occur for consistency with git’s glob specification,
but the specification now accepts all uses of **
. When **
does not
appear adjacent to a path separator or at the beginning/end of a glob,
it is now treated as two consecutive *
patterns. As such, this error
is no longer used.
UnclosedClass
Occurs when a character class (e.g., [abc]
) is not closed.
InvalidRange(char, char)
Occurs when a range in a character (e.g., [a-z]
) is invalid. For
example, if the range starts with a lexicographically larger character
than it ends with.
UnopenedAlternates
Occurs when a }
is found without a matching {
.
UnclosedAlternates
Occurs when a {
is found without a matching }
.
NestedAlternates
Occurs when an alternating group is nested inside another alternating
group, e.g., {{a,b},{c,d}}
.
DanglingEscape
Occurs when an unescaped ’' is found at the end of a glob.
Regex(String)
An error associated with parsing or compiling a regex.
Trait Implementations
impl Eq for ErrorKind
impl StructuralEq for ErrorKind
impl StructuralPartialEq for ErrorKind
Auto Trait Implementations
impl RefUnwindSafe for ErrorKind
impl Send for ErrorKind
impl Sync for ErrorKind
impl Unpin for ErrorKind
impl UnwindSafe for ErrorKind
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more