pub enum ClientProtocolError {
FrameTooLarge {
actual: usize,
max: usize,
},
TruncatedFrame {
actual: usize,
needed: usize,
},
LengthMismatch {
declared: usize,
actual: usize,
},
UnsupportedVersion {
version: u16,
supported_max: u16,
},
Codec(String),
InvalidField(&'static str),
}Expand description
External client protocol decode/encode errors.
Variants§
FrameTooLarge
Frame exceeds the configured limit.
TruncatedFrame
Not enough bytes were supplied to parse a complete frame.
LengthMismatch
The length prefix and supplied bytes disagree.
Fields
UnsupportedVersion
The frame is from a future protocol version.
Codec(String)
Payload codec failed.
InvalidField(&'static str)
Required field is invalid.
Trait Implementations§
Source§impl Clone for ClientProtocolError
impl Clone for ClientProtocolError
Source§fn clone(&self) -> ClientProtocolError
fn clone(&self) -> ClientProtocolError
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 moreSource§impl Debug for ClientProtocolError
impl Debug for ClientProtocolError
Source§impl Display for ClientProtocolError
impl Display for ClientProtocolError
impl Eq for ClientProtocolError
Source§impl Error for ClientProtocolError
impl Error for ClientProtocolError
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 PartialEq for ClientProtocolError
impl PartialEq for ClientProtocolError
Source§fn eq(&self, other: &ClientProtocolError) -> bool
fn eq(&self, other: &ClientProtocolError) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ClientProtocolError
Auto Trait Implementations§
impl Freeze for ClientProtocolError
impl RefUnwindSafe for ClientProtocolError
impl Send for ClientProtocolError
impl Sync for ClientProtocolError
impl Unpin for ClientProtocolError
impl UnsafeUnpin for ClientProtocolError
impl UnwindSafe for ClientProtocolError
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