pub enum TidError {
InvalidLength {
expected: usize,
actual: usize,
},
InvalidCharacter {
character: char,
position: usize,
},
InvalidFormat {
reason: String,
},
}Expand description
Errors that can occur during TID (Timestamp Identifier) operations.
This enum covers all validation failures when parsing and decoding TIDs, including format violations, invalid characters, and encoding errors.
Variants§
InvalidLength
Error when TID string length is invalid.
This error occurs when a TID string is not exactly 13 characters long, which is required by the TID specification.
Fields
InvalidCharacter
Error when TID contains an invalid character.
This error occurs when a TID string contains a character outside the base32-sortable character set (234567abcdefghijklmnopqrstuvwxyz).
InvalidFormat
Error when TID format is invalid.
This error occurs when the TID violates structural requirements, such as having the top bit set (which must always be 0).
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)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.