Trait wrpc_transport::frame::ConnHandler

source ·
pub trait ConnHandler<Rx, Tx> {
    // Provided methods
    fn on_ingress(rx: Rx, res: Result<()>) -> impl Future<Output = ()> + Send { ... }
    fn on_egress(tx: Tx, res: Result<()>) -> impl Future<Output = ()> + Send { ... }
}
Expand description

Connection handler defines the connection I/O behavior. It is mostly useful for transports that may require additional clean up not already covered by [AsyncWrite::shutdown], for example. This API is experimental and may change in backwards-incompatible ways in the future.

Provided Methods§

source

fn on_ingress(rx: Rx, res: Result<()>) -> impl Future<Output = ()> + Send

Handle ingress completion

source

fn on_egress(tx: Tx, res: Result<()>) -> impl Future<Output = ()> + Send

Handle egress completion

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<Rx, Tx> ConnHandler<Rx, Tx> for ()

Implementors§