#[non_exhaustive]pub enum UlidParseError {
WrongPrefix {
expected_prefix: &'static str,
},
InvalidUlid(DecodeError),
}Expand description
Error type for prefixed ULID parsing failures
Returned when a string cannot be parsed as crate::Ulid<D>: wrong
{PREFIX}_ prefix or invalid Crockford Base32 body.
Only available when the ulid feature is enabled.
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.
WrongPrefix
The string does not start with "{PREFIX}_" for this domain
Fields
§
expected_prefix: &'static strExpected UlidDomain::PREFIX value
InvalidUlid(DecodeError)
The ULID body (after the prefix) is not valid Crockford Base32
Trait Implementations§
Source§impl Clone for UlidParseError
impl Clone for UlidParseError
Source§fn clone(&self) -> UlidParseError
fn clone(&self) -> UlidParseError
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 moreSource§impl Debug for UlidParseError
impl Debug for UlidParseError
Source§impl Display for UlidParseError
impl Display for UlidParseError
Source§impl Error for UlidParseError
impl Error for UlidParseError
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 UlidParseError
impl PartialEq for UlidParseError
impl Eq for UlidParseError
impl StructuralPartialEq for UlidParseError
Auto Trait Implementations§
impl Freeze for UlidParseError
impl RefUnwindSafe for UlidParseError
impl Send for UlidParseError
impl Sync for UlidParseError
impl Unpin for UlidParseError
impl UnsafeUnpin for UlidParseError
impl UnwindSafe for UlidParseError
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