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.