pub enum KcpSegmentBuildError {
PayloadLengthTooLarge {
length: usize,
},
LengthOverflow {
header_length: usize,
payload_length: usize,
},
BufferTooShort {
required: usize,
available: usize,
},
}Expand description
Failure to construct one KCP segment in caller-provided storage.
Variants§
PayloadLengthTooLarge
The payload length cannot be represented in KCP’s u32 length field.
LengthOverflow
Adding the fixed header length and payload length overflows usize.
Fields
BufferTooShort
The destination buffer cannot hold the complete segment.
Trait Implementations§
Source§impl Clone for KcpSegmentBuildError
impl Clone for KcpSegmentBuildError
impl Copy for KcpSegmentBuildError
Source§impl Debug for KcpSegmentBuildError
impl Debug for KcpSegmentBuildError
Source§impl Display for KcpSegmentBuildError
impl Display for KcpSegmentBuildError
impl Eq for KcpSegmentBuildError
Source§impl Error for KcpSegmentBuildError
impl Error for KcpSegmentBuildError
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 KcpSegmentBuildError
impl PartialEq for KcpSegmentBuildError
impl StructuralPartialEq for KcpSegmentBuildError
Auto Trait Implementations§
impl Freeze for KcpSegmentBuildError
impl RefUnwindSafe for KcpSegmentBuildError
impl Send for KcpSegmentBuildError
impl Sync for KcpSegmentBuildError
impl Unpin for KcpSegmentBuildError
impl UnsafeUnpin for KcpSegmentBuildError
impl UnwindSafe for KcpSegmentBuildError
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