Enum tcp_handler::common::PacketError
source · pub enum PacketError {
TooLarge(usize, usize),
IO(Error),
AES(Error),
}
Expand description
Error in send/recv message.
Variants§
TooLarge(usize, usize)
The packet size is larger than the maximum allowed packet size. This is due to you sending too much data at once, resulting in triggering memory safety limit
You can reduce the size of data packet sent each time.
Or you can change the maximum packet size by call tcp_handler::config::set_config
.
IO(Error)
During io bytes.
AES(Error)
During encrypting/decrypting bytes.
Trait Implementations§
source§impl Debug for PacketError
impl Debug for PacketError
source§impl Display for PacketError
impl Display for PacketError
source§impl Error for PacketError
impl Error for PacketError
source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
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<Error> for PacketError
impl From<Error> for PacketError
source§fn from(source: AesGcmError) -> Self
fn from(source: AesGcmError) -> Self
Converts to this type from the input type.
source§impl From<Error> for PacketError
impl From<Error> for PacketError
source§impl From<PacketError> for StarterError
impl From<PacketError> for StarterError
source§fn from(source: PacketError) -> Self
fn from(source: PacketError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for PacketError
impl Send for PacketError
impl Sync for PacketError
impl Unpin for PacketError
impl !UnwindSafe for PacketError
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