Struct hyper_rustls::acceptor::AcceptorBuilder
source · pub struct AcceptorBuilder<State>(/* private fields */);
Expand description
Builder for TlsAcceptor
Implementations§
source§impl AcceptorBuilder<WantsTlsConfig>
impl AcceptorBuilder<WantsTlsConfig>
sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new AcceptorBuilder
sourcepub fn with_tls_config(self, config: ServerConfig) -> AcceptorBuilder<WantsAlpn>
pub fn with_tls_config(self, config: ServerConfig) -> AcceptorBuilder<WantsAlpn>
Passes a rustls ServerConfig
to configure the TLS connection
sourcepub fn with_single_cert(
self,
cert_chain: Vec<CertificateDer<'static>>,
key_der: PrivateKeyDer<'static>,
) -> Result<AcceptorBuilder<WantsAlpn>, Error>
pub fn with_single_cert( self, cert_chain: Vec<CertificateDer<'static>>, key_der: PrivateKeyDer<'static>, ) -> Result<AcceptorBuilder<WantsAlpn>, Error>
Use rustls default crypto provider and safe defaults without client authentication
source§impl AcceptorBuilder<WantsAlpn>
impl AcceptorBuilder<WantsAlpn>
sourcepub fn with_alpn_protocols(
self,
alpn_protocols: Vec<Vec<u8>>,
) -> AcceptorBuilder<WantsIncoming>
pub fn with_alpn_protocols( self, alpn_protocols: Vec<Vec<u8>>, ) -> AcceptorBuilder<WantsIncoming>
Configure ALPN accept protocols in order
sourcepub fn with_http2_alpn(self) -> AcceptorBuilder<WantsIncoming>
pub fn with_http2_alpn(self) -> AcceptorBuilder<WantsIncoming>
Configure ALPN to accept HTTP/2
sourcepub fn with_http10_alpn(self) -> AcceptorBuilder<WantsIncoming>
pub fn with_http10_alpn(self) -> AcceptorBuilder<WantsIncoming>
Configure ALPN to accept HTTP/1.0
sourcepub fn with_http11_alpn(self) -> AcceptorBuilder<WantsIncoming>
pub fn with_http11_alpn(self) -> AcceptorBuilder<WantsIncoming>
Configure ALPN to accept HTTP/1.1
sourcepub fn with_all_versions_alpn(self) -> AcceptorBuilder<WantsIncoming>
pub fn with_all_versions_alpn(self) -> AcceptorBuilder<WantsIncoming>
Configure ALPN to accept HTTP/2, HTTP/1.1, HTTP/1.0 in that order.
source§impl AcceptorBuilder<WantsIncoming>
impl AcceptorBuilder<WantsIncoming>
sourcepub fn with_incoming(self, incoming: impl Into<AddrIncoming>) -> TlsAcceptor
pub fn with_incoming(self, incoming: impl Into<AddrIncoming>) -> TlsAcceptor
Passes a AddrIncoming
to configure the TLS connection and
creates the TlsAcceptor
sourcepub fn with_acceptor<A>(self, acceptor: A) -> TlsAcceptor<A>
pub fn with_acceptor<A>(self, acceptor: A) -> TlsAcceptor<A>
Passes an acceptor implementing Accept
to configure the TLS connection and
creates the TlsAcceptor
Trait Implementations§
Auto Trait Implementations§
impl<State> Freeze for AcceptorBuilder<State>where
State: Freeze,
impl<State> RefUnwindSafe for AcceptorBuilder<State>where
State: RefUnwindSafe,
impl<State> Send for AcceptorBuilder<State>where
State: Send,
impl<State> Sync for AcceptorBuilder<State>where
State: Sync,
impl<State> Unpin for AcceptorBuilder<State>where
State: Unpin,
impl<State> UnwindSafe for AcceptorBuilder<State>where
State: UnwindSafe,
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