#[non_exhaustive]pub enum ParseMentionErrorType<'a> {
IdNotU64 {
found: &'a str,
},
ExtraneousPart {
found: &'a str,
},
LeadingArrow {
found: Option<char>,
},
PartMissing {
expected: usize,
found: usize,
},
Sigil {
expected: &'a [&'a str],
found: Option<char>,
},
TimestampStyleInvalid {
found: &'a str,
},
TrailingArrow {
found: Option<char>,
},
}Expand description
Type of ParseMentionError that occurred.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
IdNotU64
ID portion of the mention isn’t a u64.
ExtraneousPart
An extra part was found that shouldn’t be present.
LeadingArrow
Leading arrow (<) is not present.
PartMissing
One or more parts of the mention are missing.
For example, an emoji mention - <:name:id> - has two parts: the name
and the id, separated by the sigil (:). If the second sigil denoting
the second part can’t be found, then it is missing.
Fields
Sigil
Mention’s sigil is not present.
Users, for example, have the sigil @.
Fields
TimestampStyleInvalid
Timestamp style value is invalid.
TrailingArrow
Trailing arrow (>) is not present.
Trait Implementations§
Source§impl<'a> Debug for ParseMentionErrorType<'a>
impl<'a> Debug for ParseMentionErrorType<'a>
impl<'a> Eq for ParseMentionErrorType<'a>
Source§impl<'a> PartialEq for ParseMentionErrorType<'a>
impl<'a> PartialEq for ParseMentionErrorType<'a>
Source§fn eq(&self, other: &ParseMentionErrorType<'a>) -> bool
fn eq(&self, other: &ParseMentionErrorType<'a>) -> bool
Tests for
self and other values to be equal, and is used by ==.impl<'a> StructuralPartialEq for ParseMentionErrorType<'a>
Auto Trait Implementations§
impl<'a> Freeze for ParseMentionErrorType<'a>
impl<'a> RefUnwindSafe for ParseMentionErrorType<'a>
impl<'a> Send for ParseMentionErrorType<'a>
impl<'a> Sync for ParseMentionErrorType<'a>
impl<'a> Unpin for ParseMentionErrorType<'a>
impl<'a> UnsafeUnpin for ParseMentionErrorType<'a>
impl<'a> UnwindSafe for ParseMentionErrorType<'a>
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