Enum WriteError
#[non_exhaustive]pub enum WriteError {
TooLarge,
BufferFull,
Encode(EncodeError),
}Expand description
Error returned by PacketWriter::write.
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.
TooLarge
The packet’s encoded size exceeds the configured maximum packet size: a client must not send a packet larger than the server’s Maximum Packet Size (§3.2.2.3.6).
BufferFull
The fixed-capacity output buffer cannot hold the packet.
Encode(EncodeError)
Encoding failed. This indicates a bug, as the buffer is sized to the
packet’s encoded_len.
Trait Implementations§
§impl Clone for WriteError
impl Clone for WriteError
§fn clone(&self) -> WriteError
fn clone(&self) -> WriteError
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 more§impl Debug for WriteError
impl Debug for WriteError
§impl Display for WriteError
impl Display for WriteError
§impl Error for WriteError
impl Error for WriteError
§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()
§impl PartialEq for WriteError
impl PartialEq for WriteError
impl Copy for WriteError
impl Eq for WriteError
impl StructuralPartialEq for WriteError
Auto Trait Implementations§
impl Freeze for WriteError
impl RefUnwindSafe for WriteError
impl Send for WriteError
impl Sync for WriteError
impl Unpin for WriteError
impl UnwindSafe for WriteError
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