pub enum PeerError {
ConnectionFailed,
ConnectionLost,
QueueFull,
Disconnected,
Timeout,
Io(String),
InvalidOperation(String),
ReceiverTaken,
}Expand description
Errors that can occur during peer operations.
Variants§
ConnectionFailed
Connection failed and could not be established
ConnectionLost
Connection was lost during operation
QueueFull
Message queue is full
Disconnected
Peer is disconnected and cannot perform operation
Timeout
Connection timeout occurred
Io(String)
I/O operation failed
InvalidOperation(String)
Invalid operation for current peer state
ReceiverTaken
Receiver has been taken via take_receiver()
Trait Implementations§
Source§impl Error for PeerError
impl Error for PeerError
1.30.0§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§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<PeerError> for MessagingError
impl From<PeerError> for MessagingError
Source§fn from(err: PeerError) -> MessagingError
fn from(err: PeerError) -> MessagingError
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for PeerError
impl RefUnwindSafe for PeerError
impl Send for PeerError
impl Sync for PeerError
impl Unpin for PeerError
impl UnwindSafe for PeerError
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)