pub enum Error {
BufferTooShort {
required: usize,
had: usize,
},
VarintOverflow {
bytes: usize,
},
UnsignedOverflow {
value: u64,
},
SignedOverflow {
value: i64,
},
TagTooLarge {
tag: u64,
},
UnknownDiscriminant {
discriminant: u32,
},
NotAChar {
value: u32,
},
}
Expand description
All Error conditions within buffertk
.
Variants§
BufferTooShort
BufferTooShort indicates that there was a need to pack or unpack more bytes than were available in the underlying memory.
Fields
VarintOverflow
VarintOverflow indicates that a varint field did not terminate with a number < 128.
UnsignedOverflow
UnsignedOverflow indicates that a value will not fit its intended (unsigned) target.
SignedOverflow
SignedOverflow indicates that a value will not fit its intended (signed) target.
TagTooLarge
TagTooLarge indicates the tag would overflow a 32-bit number.
UnknownDiscriminant
UnknownDiscriminant indicates a variant that is not understood by this code.
NotAChar
NotAChar indicates that the prescribed value was tried to unpack as a char, but it’s not a char.
Trait Implementations§
impl Eq for Error
impl StructuralPartialEq for Error
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnwindSafe for Error
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,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)