pub enum ConstrainedError {
Show 13 variants
PacketTooSmall {
expected: usize,
actual: usize,
},
InvalidHeader(String),
ConnectionNotFound(ConnectionId),
ConnectionExists(ConnectionId),
InvalidStateTransition {
from: String,
to: String,
},
ConnectionReset,
Timeout,
MaxRetransmissions {
count: u32,
},
SendBufferFull,
ReceiveBufferFull,
Transport(String),
SequenceOutOfWindow {
seq: u8,
expected_min: u8,
expected_max: u8,
},
ConnectionClosed,
}Expand description
Errors that can occur in the constrained protocol
Variants§
PacketTooSmall
Packet too small to contain header
InvalidHeader(String)
Invalid header format
ConnectionNotFound(ConnectionId)
Connection not found
ConnectionExists(ConnectionId)
Connection already exists
InvalidStateTransition
Invalid state transition
ConnectionReset
Connection reset by peer
Timeout
Connection timed out
MaxRetransmissions
Maximum retransmissions exceeded
SendBufferFull
Send buffer full
ReceiveBufferFull
Receive buffer full
Transport(String)
Transport error
SequenceOutOfWindow
Sequence number out of window
Fields
ConnectionClosed
Connection closed
Trait Implementations§
Source§impl Clone for ConstrainedError
impl Clone for ConstrainedError
Source§fn clone(&self) -> ConstrainedError
fn clone(&self) -> ConstrainedError
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 moreSource§impl Debug for ConstrainedError
impl Debug for ConstrainedError
Source§impl Display for ConstrainedError
impl Display for ConstrainedError
Source§impl Error for ConstrainedError
impl Error for ConstrainedError
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 From<ConstrainedError> for RouterError
impl From<ConstrainedError> for RouterError
Source§fn from(err: ConstrainedError) -> Self
fn from(err: ConstrainedError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ConstrainedError
impl RefUnwindSafe for ConstrainedError
impl Send for ConstrainedError
impl Sync for ConstrainedError
impl Unpin for ConstrainedError
impl UnwindSafe for ConstrainedError
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