pub enum TidError {
WrongLength(usize),
InvalidCharacter(char),
HighBitSet(char),
}Expand description
Why a string is not a TID.
Variants§
WrongLength(usize)
Not exactly TID_LENGTH characters.
InvalidCharacter(char)
A character outside BASE32_SORTABLE. Case matters: 3JZFCIJPJ2Z2A
is not the same string as 3jzfcijpj2z2a and is not a TID.
HighBitSet(char)
The top bit of the 64-bit value is set.
The leading character therefore has to fall in the first half of the
alphabet, which is what rules out zzzzzzzzzzzzz. The bit is reserved,
and a value that uses it is a different format wearing this one’s
shape.
Trait Implementations§
Source§impl Error for TidError
impl Error for TidError
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 Eq for TidError
impl StructuralPartialEq for TidError
Auto Trait Implementations§
impl Freeze for TidError
impl RefUnwindSafe for TidError
impl Send for TidError
impl Sync for TidError
impl Unpin for TidError
impl UnsafeUnpin for TidError
impl UnwindSafe for TidError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.