pub enum RpcCodecError {
TooShort,
BadMethod(u8),
LengthMismatch {
declared: usize,
actual: usize,
},
BadFragmentIndex {
index: u16,
total: u16,
},
BadSenderLen(u8),
}Expand description
Why a frame could not be decoded. Distinct variants so a caller can count transport damage separately from foreign traffic on a shared lane.
Variants§
TooShort
Shorter than the fixed header.
BadMethod(u8)
A method byte this build does not know.
LengthMismatch
The declared lengths do not match the bytes actually present.
BadFragmentIndex
The fragment’s own index/total pair is impossible. Kept separate from
Self::LengthMismatch, whose fields are byte counts.
BadSenderLen(u8)
A response fragment claims a sender id longer than MAX_DEVICE_ID.
Trait Implementations§
Source§impl Clone for RpcCodecError
impl Clone for RpcCodecError
impl Copy for RpcCodecError
Source§impl Debug for RpcCodecError
impl Debug for RpcCodecError
impl Eq for RpcCodecError
Source§impl PartialEq for RpcCodecError
impl PartialEq for RpcCodecError
impl StructuralPartialEq for RpcCodecError
Auto Trait Implementations§
impl Freeze for RpcCodecError
impl RefUnwindSafe for RpcCodecError
impl Send for RpcCodecError
impl Sync for RpcCodecError
impl Unpin for RpcCodecError
impl UnsafeUnpin for RpcCodecError
impl UnwindSafe for RpcCodecError
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§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.