pub enum ProtocolVersionError {
UnsupportedVersion(u8),
InvalidLength {
got: usize,
expected: usize,
},
TryFromSlice,
}
Expand description
An error that can occur when encoding or decoding a ProtocolVersion.
Variants§
UnsupportedVersion(u8)
An unsupported version was encountered.
InvalidLength
An invalid length was encountered.
TryFromSlice
Failed to convert slice to array.
Trait Implementations§
source§impl Clone for ProtocolVersionError
impl Clone for ProtocolVersionError
source§fn clone(&self) -> ProtocolVersionError
fn clone(&self) -> ProtocolVersionError
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for ProtocolVersionError
impl Debug for ProtocolVersionError
source§impl Display for ProtocolVersionError
impl Display for ProtocolVersionError
source§impl From<TryFromSliceError> for ProtocolVersionError
impl From<TryFromSliceError> for ProtocolVersionError
source§fn from(value: TryFromSliceError) -> Self
fn from(value: TryFromSliceError) -> Self
Converts to this type from the input type.
impl Copy for ProtocolVersionError
Auto Trait Implementations§
impl Freeze for ProtocolVersionError
impl RefUnwindSafe for ProtocolVersionError
impl Send for ProtocolVersionError
impl Sync for ProtocolVersionError
impl Unpin for ProtocolVersionError
impl UnwindSafe for ProtocolVersionError
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
)Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 24 bytes
Size for each variant:
UnsupportedVersion
: 1 byteInvalidLength
: 23 bytesTryFromSlice
: 0 bytes