pub struct ConnHandler;Expand description
Graceful stream shutdown handler
Trait Implementations§
Source§impl ConnHandler<BufReader<RecvStream>, SendStream> for ConnHandler
impl ConnHandler<BufReader<RecvStream>, SendStream> for ConnHandler
Source§const DRAIN: bool = false
const DRAIN: bool = false
Whether to keep reading once all Incoming handles are dropped until the peer closes
the stream, rather than aborting ingress and dropping the reader.
Any data received after all handles are dropped, or received for a registered path, which
was never indexed, fails ingress with
std::io::ErrorKind::BrokenPipe.
Draining is required for transports that reset the connection when closed with
unread data, like TCP, discarding data not yet received by the peer.Source§async fn on_ingress(rx: BufReader<RecvStream>, res: Result<()>)
async fn on_ingress(rx: BufReader<RecvStream>, res: Result<()>)
Handle ingress completion
Auto Trait Implementations§
impl Freeze for ConnHandler
impl RefUnwindSafe for ConnHandler
impl Send for ConnHandler
impl Sync for ConnHandler
impl Unpin for ConnHandler
impl UnsafeUnpin for ConnHandler
impl UnwindSafe for ConnHandler
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