pub enum CloseReason {
Other,
RemoteClosed,
GoingOffline,
Error,
MaliciousPeer,
}Expand description
Reasons for closing a connection
Variants§
Other
Reason is unknown or doesn’t fit the other reasons
RemoteClosed
The other peer closed the connection
GoingOffline
We need to close the connection to this peer because we are going offline and don’t want new connections.
Error
There was an error and there is need to close the connection
MaliciousPeer
Peer is malicious. This will cause the peer ID and address to get banned.
Trait Implementations§
Source§impl Clone for CloseReason
impl Clone for CloseReason
Source§fn clone(&self) -> CloseReason
fn clone(&self) -> CloseReason
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for CloseReason
Auto Trait Implementations§
impl Freeze for CloseReason
impl RefUnwindSafe for CloseReason
impl Send for CloseReason
impl Sync for CloseReason
impl Unpin for CloseReason
impl UnsafeUnpin for CloseReason
impl UnwindSafe for CloseReason
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