pub enum IdError {
NodeIdOutOfRange,
InvalidUlidLength,
InvalidUlidCharacter,
UlidOverflow,
InvalidUuidFormat,
InvalidSnowflakeString,
}Expand description
Error type returned by Snowflake, ULID, and UUIDv7 constructors and parsers.
Variants§
NodeIdOutOfRange
Node ID exceeded the 10-bit Snowflake limit (0..=1023).
InvalidUlidLength
ULID input length was not 26 bytes.
InvalidUlidCharacter
ULID input contained a character outside Crockford Base32.
UlidOverflow
ULID first character exceeded '7', overflowing 128 bits.
InvalidUuidFormat
UUID input did not match 32-hex or 36-char hyphenated format.
InvalidSnowflakeString
Snowflake text representation failed to parse as a 64-bit unsigned integer.
Trait Implementations§
impl Copy for IdError
impl Eq for IdError
Source§impl Error for IdError
Marks IdError as a standard error type.
impl Error for IdError
Marks IdError as a standard error type.
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()
impl StructuralPartialEq for IdError
Auto Trait Implementations§
impl Forget for IdError
impl Freeze for IdError
impl Move for IdError
impl RefUnwindSafe for IdError
impl Send for IdError
impl Sync for IdError
impl Unpin for IdError
impl UnsafeUnpin for IdError
impl UnwindSafe for IdError
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