#[repr(u32)]pub enum RE2ErrorCode {
Show 16 variants
Internal = 1,
BadEscape = 2,
BadCharClass = 3,
BadCharRange = 4,
MissingBracket = 5,
MissingParen = 6,
UnexpectedParen = 7,
TrailingBackslash = 8,
RepeatArgument = 9,
RepeatSize = 10,
RepeatOp = 11,
BadPerlOp = 12,
BadUTF8 = 13,
BadNamedCapture = 14,
PatternTooLarge = 15,
UnknownError = 300,
}
Expand description
Basic error code for compile failures, corresponding to a C++ enum.
Variants§
Internal = 1
Unexpected error
BadEscape = 2
bad escape sequence
BadCharClass = 3
bad character class
BadCharRange = 4
bad character class range
MissingBracket = 5
missing closing ‘]’
MissingParen = 6
missing closing ‘)’
UnexpectedParen = 7
unexpected closing ‘)’
TrailingBackslash = 8
trailing ’' at end of regexp
RepeatArgument = 9
repeat argument missing, e.g. “*”
RepeatSize = 10
bad repetition argument
RepeatOp = 11
bad repetition operator
BadPerlOp = 12
bad perl operator
BadUTF8 = 13
invalid UTF-8 in regexp
BadNamedCapture = 14
bad named capture group
PatternTooLarge = 15
pattern too large (compile failed)
UnknownError = 300
unknown error (not within re2 spec)
Trait Implementations§
Source§impl Clone for RE2ErrorCode
impl Clone for RE2ErrorCode
Source§fn clone(&self) -> RE2ErrorCode
fn clone(&self) -> RE2ErrorCode
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for RE2ErrorCode
impl Debug for RE2ErrorCode
Source§impl Display for RE2ErrorCode
impl Display for RE2ErrorCode
Source§impl Error for RE2ErrorCode
impl Error for RE2ErrorCode
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<RE2ErrorCode> for RE2Error
impl From<RE2ErrorCode> for RE2Error
Source§fn from(source: RE2ErrorCode) -> Self
fn from(source: RE2ErrorCode) -> Self
Converts to this type from the input type.
Source§impl From<RE2ErrorCode> for u32
impl From<RE2ErrorCode> for u32
Source§fn from(enum_value: RE2ErrorCode) -> Self
fn from(enum_value: RE2ErrorCode) -> Self
Converts to this type from the input type.
Source§impl From<u32> for RE2ErrorCode
impl From<u32> for RE2ErrorCode
Source§impl FromPrimitive for RE2ErrorCode
impl FromPrimitive for RE2ErrorCode
Source§impl Hash for RE2ErrorCode
impl Hash for RE2ErrorCode
Source§impl Ord for RE2ErrorCode
impl Ord for RE2ErrorCode
Source§fn cmp(&self, other: &RE2ErrorCode) -> Ordering
fn cmp(&self, other: &RE2ErrorCode) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for RE2ErrorCode
impl PartialEq for RE2ErrorCode
Source§impl PartialOrd for RE2ErrorCode
impl PartialOrd for RE2ErrorCode
impl Copy for RE2ErrorCode
impl Eq for RE2ErrorCode
impl StructuralPartialEq for RE2ErrorCode
Auto Trait Implementations§
impl Freeze for RE2ErrorCode
impl RefUnwindSafe for RE2ErrorCode
impl Send for RE2ErrorCode
impl Sync for RE2ErrorCode
impl Unpin for RE2ErrorCode
impl UnwindSafe for RE2ErrorCode
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.