pub enum ByteSliceErrorKind {
Empty,
Overflow,
}Expand description
The reason a FromByteSlice parse failed.
Variants§
Empty
The input slice was empty. An empty slice is rejected rather than read
as 0, so a truncated or missing buffer can’t masquerade as a valid
zero value.
Overflow
The input had more bytes than the target type can hold. The value is never silently truncated.
Trait Implementations§
Source§impl Clone for ByteSliceErrorKind
impl Clone for ByteSliceErrorKind
Source§fn clone(&self) -> ByteSliceErrorKind
fn clone(&self) -> ByteSliceErrorKind
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ByteSliceErrorKind
Source§impl Debug for ByteSliceErrorKind
impl Debug for ByteSliceErrorKind
impl Eq for ByteSliceErrorKind
Source§impl PartialEq for ByteSliceErrorKind
impl PartialEq for ByteSliceErrorKind
Source§fn eq(&self, other: &ByteSliceErrorKind) -> bool
fn eq(&self, other: &ByteSliceErrorKind) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ByteSliceErrorKind
Auto Trait Implementations§
impl Freeze for ByteSliceErrorKind
impl RefUnwindSafe for ByteSliceErrorKind
impl Send for ByteSliceErrorKind
impl Sync for ByteSliceErrorKind
impl Unpin for ByteSliceErrorKind
impl UnsafeUnpin for ByteSliceErrorKind
impl UnwindSafe for ByteSliceErrorKind
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