pub enum MatchError {
StackOverflow,
ValidationError,
UnsupportedOperation,
Other,
}
Expand description
These are errors that may be returned by the matcher when matching a pattern.
Variants§
StackOverflow
Returned if the pattern nests too deeply.
ValidationError
Returned if the pattern rejects the input.
UnsupportedOperation
Returned if the pattern attempts an unsupported operation.
In particular, if the PatternTypes
doesn’t support get
or pairs
for a given value, this error will be returned. It can be treated as a
ValidationError, or as a bug in the pattern, at the user’s discretion.
Other
Returned if an unspecified non-critical error occurred.
Trait Implementations§
Source§impl Clone for MatchError
impl Clone for MatchError
Source§fn clone(&self) -> MatchError
fn clone(&self) -> MatchError
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 moreAuto Trait Implementations§
impl Freeze for MatchError
impl RefUnwindSafe for MatchError
impl Send for MatchError
impl Sync for MatchError
impl Unpin for MatchError
impl UnwindSafe for MatchError
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