#[non_exhaustive]pub enum ParseHandleError {
TooShort {
min: usize,
},
TooLong {
max: usize,
},
InvalidCharacter(char),
InvalidFormat,
InvalidPercentEncoding,
InvalidUtf8,
}Expand description
An invalid social media handle.
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.
TooShort
The handle has fewer than the required number of characters.
TooLong
The handle exceeds the maximum number of characters.
InvalidCharacter(char)
The handle contains a character that the upstream does not permit.
InvalidFormat
The characters are individually permitted, but their arrangement is not.
InvalidPercentEncoding
A percent escape is incomplete or contains non-hexadecimal digits.
InvalidUtf8
The percent-decoded bytes are not UTF-8.
Trait Implementations§
Source§impl Clone for ParseHandleError
impl Clone for ParseHandleError
Source§fn clone(&self) -> ParseHandleError
fn clone(&self) -> ParseHandleError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ParseHandleError
Source§impl Debug for ParseHandleError
impl Debug for ParseHandleError
Source§impl Display for ParseHandleError
impl Display for ParseHandleError
impl Eq for ParseHandleError
Source§impl Error for ParseHandleError
impl Error for ParseHandleError
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 PartialEq for ParseHandleError
impl PartialEq for ParseHandleError
impl StructuralPartialEq for ParseHandleError
Auto Trait Implementations§
impl Freeze for ParseHandleError
impl RefUnwindSafe for ParseHandleError
impl Send for ParseHandleError
impl Sync for ParseHandleError
impl Unpin for ParseHandleError
impl UnsafeUnpin for ParseHandleError
impl UnwindSafe for ParseHandleError
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