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
Fields
BufferTooShort indicates that there was a need to pack or unpack more bytes than were available in the underlying memory.
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§
source§impl PartialEq for Error
impl PartialEq for Error
impl Eq for Error
impl StructuralPartialEq for Error
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§
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