pub enum Reason<Err> {
Service(ServiceDisconnect),
Error(Error<Err>),
ProtocolError(ProtocolError),
PeerGone(PeerGone),
KeepAlive(KeepAlive),
}Expand description
Reason supplied with an HTTP/1 disconnect notification.
Variants§
Service(ServiceDisconnect)
The HTTP service initiated the disconnect.
Error(Error<Err>)
The application service returned an error.
ProtocolError(ProtocolError)
HTTP/1 decoding, encoding, or timeout processing failed.
PeerGone(PeerGone)
The peer closed the connection or an I/O error occurred.
KeepAlive(KeepAlive)
The keep-alive timer expired.
Implementations§
Source§impl<Err: ResponseError> Reason<Err>
impl<Err: ResponseError> Reason<Err>
Sourcepub fn ack<F>(self) -> ControlAck<F>
pub fn ack<F>(self) -> ControlAck<F>
Acknowledges the disconnect notification and stops the connection.
Trait Implementations§
Auto Trait Implementations§
impl<Err> !RefUnwindSafe for Reason<Err>
impl<Err> !Send for Reason<Err>
impl<Err> !Sync for Reason<Err>
impl<Err> !UnwindSafe for Reason<Err>
impl<Err> Freeze for Reason<Err>where
Err: Freeze,
impl<Err> Unpin for Reason<Err>where
Err: Unpin,
impl<Err> UnsafeUnpin for Reason<Err>where
Err: UnsafeUnpin,
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