#[non_exhaustive]
pub enum Error {
InvalidUuidString {
message: String,
},
RepresentationMismatch {
expected_binary_subtype: BinarySubtype,
actual_binary_subtype: BinarySubtype,
requested_representation: UuidRepresentation,
},
InvalidLength {
length: usize,
},
}
Expand description
Errors that can occur during Uuid
construction and generation.
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
InvalidUuidString
Fields
This variant is marked as non-exhaustive
message: String
Error returned when an invalid string is provided to Uuid::parse_str
.
RepresentationMismatch
Fields
This variant is marked as non-exhaustive
expected_binary_subtype: BinarySubtype
The subtype that was expected given the requested representation.
actual_binary_subtype: BinarySubtype
The actual subtype of the binary value.
requested_representation: UuidRepresentation
The requested representation.
Error returned when the representation specified does not match the underlying
crate::Binary
value in crate::Binary::to_uuid_with_representation
.
InvalidLength
Fields
This variant is marked as non-exhaustive
length: usize
The actual length of the data.
Error returned from crate::Binary::to_uuid
if the underling data is not 16 bytes long.
Trait Implementations
sourceimpl Error for Error
impl Error for Error
1.30.0 · sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
sourcefn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
backtrace
)Returns a stack backtrace, if available, of where this error occurred. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Auto Trait Implementations
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnwindSafe for Error
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more