Type Alias BoxCertificateFuture
pub type BoxCertificateFuture = Pin<Box<dyn Future<Output = Result<Box<dyn FnOnce(CertificateSelection<'_>) -> Result<(), AsyncSelectCertError>>, AsyncSelectCertError>> + Send>>;Available on crate features
boring and crypto and std only.Expand description
Future returned by SslContextBuilder::set_async_certificate_callback.
It owns its inputs; it cannot retain a borrow of the TLS connection or request:
ⓘ
use rama_boring::ssl::{AsyncSelectCertError, BoxCertificateFuture, CertificateSelection};
fn retain(selection: &CertificateSelection<'_>) -> BoxCertificateFuture {
let algorithms = selection.peer_verify_algorithms();
Box::pin(async move {
assert!(!algorithms.is_empty());
Err(AsyncSelectCertError)
})
}Aliased Type§
#[repr(transparent)]pub struct BoxCertificateFuture { /* private fields */ }