Trait s2n_quic::provider::tls::default::callbacks::ConnectionFuture

source ·
pub trait ConnectionFuture: 'static + Send + Sync {
    // Required method
    fn poll(
        self: Pin<&mut Self>,
        connection: &mut Connection,
        ctx: &mut Context<'_>
    ) -> Poll<Result<(), Error>>;
}
Expand description

The Future associated with the async connection callback.

The calling application can provide an instance of ConnectionFuture when implementing an async callback, eg. crate::callbacks::ClientHelloCallback, if it wants to run an asynchronous operation (disk read, network call). The application can return an error ([Err(Error::application())]) to indicate connection failure.

Required Methods§

source

fn poll( self: Pin<&mut Self>, connection: &mut Connection, ctx: &mut Context<'_> ) -> Poll<Result<(), Error>>

Implementors§

source§

impl<F> ConnectionFuture for ConfigResolver<F>
where F: 'static + Send + Sync + Future<Output = Result<Config, Error>>,