pub enum Reason<Err> {
Service(ServiceDisconnect),
Error(Error<Err>),
ProtocolError(ProtocolError),
PeerGone(PeerGone),
KeepAlive(KeepAlive),
}Expand description
Disconnect reason
Variants§
Service(ServiceDisconnect)
Disconnect initiated by service
Error(Error<Err>)
Application level error
ProtocolError(ProtocolError)
Protocol level error
PeerGone(PeerGone)
Peer is gone
KeepAlive(KeepAlive)
Keep-alive timeout
Implementations§
Source§impl<Err: ResponseError> Reason<Err>
impl<Err: ResponseError> Reason<Err>
pub fn ack<F>(self) -> ControlAck<F>
Trait Implementations§
Auto Trait Implementations§
impl<Err> Freeze for Reason<Err>where
Err: Freeze,
impl<Err> !RefUnwindSafe for Reason<Err>
impl<Err> !Send for Reason<Err>
impl<Err> !Sync for Reason<Err>
impl<Err> Unpin for Reason<Err>where
Err: Unpin,
impl<Err> !UnwindSafe for Reason<Err>
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