#[non_exhaustive]pub enum DExtraError {
UnknownPacketLength {
got: usize,
},
DsvtMagicMissing {
got: [u8; 4],
},
StreamIdZero,
InvalidModuleByte {
offset: usize,
byte: u8,
},
UnknownConnectTag {
tag: [u8; 3],
},
EncodeBufferTooSmall {
need: usize,
have: usize,
},
}Expand description
Errors returned by the DExtra codec functions.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
UnknownPacketLength
DExtra packet length is not one of the known sizes.
DsvtMagicMissing
Packet expected to be DSVT-framed but the magic at [0..4] is wrong.
StreamIdZero
Stream id at offsets [12..14] is zero.
InvalidModuleByte
LINK packet has a non-A-Z reflector or client module byte.
UnknownConnectTag
Connect reply tag at [10..13] is neither ACK nor NAK.
EncodeBufferTooSmall
An encoder was called with an undersized output buffer.
Programming error inside crate::session::client::SessionCore;
surfaced as a variant rather than swallowed so callers can
still observe the fault.
Trait Implementations§
Source§impl Clone for DExtraError
impl Clone for DExtraError
Source§fn clone(&self) -> DExtraError
fn clone(&self) -> DExtraError
Returns a duplicate 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 DExtraError
impl Debug for DExtraError
Source§impl Display for DExtraError
impl Display for DExtraError
Source§impl Error for DExtraError
impl Error for DExtraError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<DExtraError> for ProtocolError
impl From<DExtraError> for ProtocolError
Source§fn from(source: DExtraCodecError) -> Self
fn from(source: DExtraCodecError) -> Self
Converts to this type from the input type.
Source§impl From<EncodeError> for DExtraError
impl From<EncodeError> for DExtraError
Source§fn from(value: EncodeError) -> Self
fn from(value: EncodeError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for DExtraError
impl PartialEq for DExtraError
impl Eq for DExtraError
impl StructuralPartialEq for DExtraError
Auto Trait Implementations§
impl Freeze for DExtraError
impl RefUnwindSafe for DExtraError
impl Send for DExtraError
impl Sync for DExtraError
impl Unpin for DExtraError
impl UnwindSafe for DExtraError
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