pub enum CodecError {
Text(FrameCodecError),
TruncatedBinaryFrame,
UnknownBinaryKind(u8),
InvalidUtf8(&'static str),
FieldTooLong {
field: &'static str,
length: usize,
},
InvalidOutboundReplyPayload,
FrameTooLarge {
length: usize,
maximum: usize,
},
BinaryPayloadTooLarge {
length: usize,
maximum: usize,
},
}Expand description
Failure while encoding or decoding a Phoenix v2 wire message.
Variants§
Text(FrameCodecError)
A text frame could not be encoded or decoded.
TruncatedBinaryFrame
A binary frame ended before all declared fields were present.
UnknownBinaryKind(u8)
A binary frame used an unknown Phoenix serializer kind byte.
InvalidUtf8(&'static str)
A binary-frame string field was not valid UTF-8.
FieldTooLong
A binary-frame field exceeded the serializer’s one-byte length.
InvalidOutboundReplyPayload
An outbound reply payload had a shape unsupported by the serializer.
FrameTooLarge
The complete encoded frame exceeded the configured limit.
BinaryPayloadTooLarge
The binary payload exceeded the configured limit.
Trait Implementations§
Source§impl Debug for CodecError
impl Debug for CodecError
Source§impl Display for CodecError
impl Display for CodecError
Source§impl Error for CodecError
impl Error for CodecError
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<CodecError> for SessionError
impl From<CodecError> for SessionError
Source§fn from(source: CodecError) -> Self
fn from(source: CodecError) -> Self
Converts to this type from the input type.
Source§impl From<FrameCodecError> for CodecError
impl From<FrameCodecError> for CodecError
Source§fn from(source: FrameCodecError) -> Self
fn from(source: FrameCodecError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for CodecError
impl !RefUnwindSafe for CodecError
impl Send for CodecError
impl Sync for CodecError
impl Unpin for CodecError
impl UnsafeUnpin for CodecError
impl !UnwindSafe for CodecError
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