pub enum ShortIdError {
ZeroBytes,
TooManyBytes {
requested: usize,
max: usize,
},
TooFewBytesForOrdered {
requested: usize,
},
InvalidString,
}Expand description
Errors returned by the custom-length ID generation functions.
Variants§
ZeroBytes
num_bytes was 0.
TooManyBytes
num_bytes exceeded [MAX_BYTES].
TooFewBytesForOrdered
num_bytes was less than 8, which is required for the timestamp prefix in ordered IDs.
InvalidString
The string is not a valid ShortId (wrong length or characters outside the URL-safe
base64 alphabet).
Trait Implementations§
Source§impl Clone for ShortIdError
impl Clone for ShortIdError
Source§fn clone(&self) -> ShortIdError
fn clone(&self) -> ShortIdError
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 ShortIdError
impl Debug for ShortIdError
Source§impl Display for ShortIdError
impl Display for ShortIdError
Source§impl Error for ShortIdError
impl Error for ShortIdError
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 ShortIdError
impl PartialEq for ShortIdError
impl Eq for ShortIdError
impl StructuralPartialEq for ShortIdError
Auto Trait Implementations§
impl Freeze for ShortIdError
impl RefUnwindSafe for ShortIdError
impl Send for ShortIdError
impl Sync for ShortIdError
impl Unpin for ShortIdError
impl UnsafeUnpin for ShortIdError
impl UnwindSafe for ShortIdError
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