pub enum TransportError {
Show 16 variants
SendBadMessage = 1,
RecvBadMessage = 2,
BindFailed = 3,
ConnectionDrop = 4,
AlreadyConnected = 5,
PeerNotFound = 6,
PeerBusy = 7,
UnknownRoute = 8,
InvalidAddress = 9,
Capacity = 10,
Encoding = 11,
Protocol = 12,
GenericIo = 13,
PortalInvalidState = 14,
InvalidRouterResponseType = 15,
AttackAttmept = 16,
}
Expand description
A Transport worker specific error type
Variants§
SendBadMessage = 1
Failed to send a malformed message
RecvBadMessage = 2
Failed to receive a malformed message
BindFailed = 3
Failed to bind to the desired socket
ConnectionDrop = 4
Connection was dropped unexpectedly
AlreadyConnected = 5
Connection was already established
PeerNotFound = 6
Connection peer was not found
PeerBusy = 7
Peer requested the incoming connection
UnknownRoute = 8
Failed to route to an unknown recipient
InvalidAddress = 9
Failed to parse the socket address
Capacity = 10
Failed to read message (buffer exhausted) or failed to send it (size is too big)
Encoding = 11
Failed to encode message
Protocol = 12
Transport protocol violation
GenericIo = 13
A generic I/O failure
PortalInvalidState = 14
PortalInvalidState
InvalidRouterResponseType = 15
InvalidRouterResponseType
AttackAttmept = 16
Excessive length of header, possible DoS attack https://github.com/advisories/GHSA-9mcr-873m-xcxp
Trait Implementations§
source§impl Clone for TransportError
impl Clone for TransportError
source§fn clone(&self) -> TransportError
fn clone(&self) -> TransportError
Returns a copy 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 TransportError
impl Debug for TransportError
source§impl Display for TransportError
impl Display for TransportError
source§impl Error for TransportError
impl Error for TransportError
1.30.0 · 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 TransportError
impl From<Error> for TransportError
source§impl From<TransportError> for Error
impl From<TransportError> for Error
source§fn from(err: TransportError) -> Error
fn from(err: TransportError) -> Error
Converts to this type from the input type.
source§impl PartialEq for TransportError
impl PartialEq for TransportError
source§fn eq(&self, other: &TransportError) -> bool
fn eq(&self, other: &TransportError) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for TransportError
impl Eq for TransportError
impl StructuralPartialEq for TransportError
Auto Trait Implementations§
impl Freeze for TransportError
impl RefUnwindSafe for TransportError
impl Send for TransportError
impl Sync for TransportError
impl Unpin for TransportError
impl UnwindSafe for TransportError
Blanket Implementations§
source§impl<D> AsyncTryClone for D
impl<D> AsyncTryClone for D
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