pub enum KcpSegmentParseError {
HeaderTruncated {
required: usize,
available: usize,
},
PayloadLengthNotRepresentable {
value: u32,
},
LengthOverflow {
header_length: usize,
payload_length: usize,
},
PayloadTruncated {
required: usize,
available: usize,
},
}Expand description
Failure to parse one KCP segment.
Variants§
HeaderTruncated
The input does not contain KCP’s complete fixed-size header.
PayloadLengthNotRepresentable
The encoded payload length cannot be represented on this target.
LengthOverflow
Adding the fixed header length and encoded payload length overflows usize.
Fields
PayloadTruncated
The input does not contain the complete encoded payload.
Trait Implementations§
Source§impl Clone for KcpSegmentParseError
impl Clone for KcpSegmentParseError
impl Copy for KcpSegmentParseError
Source§impl Debug for KcpSegmentParseError
impl Debug for KcpSegmentParseError
Source§impl Display for KcpSegmentParseError
impl Display for KcpSegmentParseError
impl Eq for KcpSegmentParseError
Source§impl Error for KcpSegmentParseError
impl Error for KcpSegmentParseError
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 KcpSegmentParseError
impl PartialEq for KcpSegmentParseError
impl StructuralPartialEq for KcpSegmentParseError
Auto Trait Implementations§
impl Freeze for KcpSegmentParseError
impl RefUnwindSafe for KcpSegmentParseError
impl Send for KcpSegmentParseError
impl Sync for KcpSegmentParseError
impl Unpin for KcpSegmentParseError
impl UnsafeUnpin for KcpSegmentParseError
impl UnwindSafe for KcpSegmentParseError
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