Enum nakamoto_net::Disconnect
source · Expand description
Disconnection event which includes the reason.
Variants
DialError(Arc<Error>)
Error while dialing the remote. This error occures before a connection is even established. Errors of this kind are usually not transient.
ConnectionError(Arc<Error>)
Error with an underlying established connection. Sometimes, reconnecting after such an error is possible.
StateMachine(T)
Peer was disconnected for another reason.
Implementations
sourceimpl<T> Disconnect<T>
impl<T> Disconnect<T>
pub fn is_dial_err(&self) -> bool
pub fn is_connection_err(&self) -> bool
Trait Implementations
sourceimpl<T: Clone> Clone for Disconnect<T>
impl<T: Clone> Clone for Disconnect<T>
sourcefn clone(&self) -> Disconnect<T>
fn clone(&self) -> Disconnect<T>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl<T: Debug> Debug for Disconnect<T>
impl<T: Debug> Debug for Disconnect<T>
Auto Trait Implementations
impl<T> !RefUnwindSafe for Disconnect<T>
impl<T> Send for Disconnect<T>where
T: Send,
impl<T> Sync for Disconnect<T>where
T: Sync,
impl<T> Unpin for Disconnect<T>where
T: Unpin,
impl<T> !UnwindSafe for Disconnect<T>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more