pub struct OpenSSLAcceptor<A = DefaultAcceptor> { /* private fields */ }
Available on crate feature
tls-openssl
only.Expand description
Represents a TLS acceptor that uses OpenSSL for cryptographic operations.
This structure is used for handling TLS encrypted connections.
The acceptor is backed by OpenSSL, and is used to upgrade incoming non-secure connections to secure TLS connections.
The default TLS handshake timeout is set to 10 seconds.
Implementations§
Source§impl OpenSSLAcceptor
impl OpenSSLAcceptor
Sourcepub fn new(config: OpenSSLConfig) -> Self
pub fn new(config: OpenSSLConfig) -> Self
Constructs a new instance of the OpenSSL acceptor.
§Arguments
config
: Configuration options for the OpenSSL server.
Sourcepub fn handshake_timeout(self, val: Duration) -> Self
pub fn handshake_timeout(self, val: Duration) -> Self
Trait Implementations§
Source§impl<A, I, S> Accept<I, S> for OpenSSLAcceptor<A>
impl<A, I, S> Accept<I, S> for OpenSSLAcceptor<A>
Source§fn accept(&self, stream: I, service: S) -> Self::Future
fn accept(&self, stream: I, service: S) -> Self::Future
Handles the incoming stream, initiates a TLS handshake, and upgrades it to a secure connection.
Source§type Stream = SslStream<<A as Accept<I, S>>::Stream>
type Stream = SslStream<<A as Accept<I, S>>::Stream>
The modified or transformed IO stream produced by
accept
.Source§impl<A: Clone> Clone for OpenSSLAcceptor<A>
impl<A: Clone> Clone for OpenSSLAcceptor<A>
Source§fn clone(&self) -> OpenSSLAcceptor<A>
fn clone(&self) -> OpenSSLAcceptor<A>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl<A> Freeze for OpenSSLAcceptor<A>where
A: Freeze,
impl<A> RefUnwindSafe for OpenSSLAcceptor<A>where
A: RefUnwindSafe,
impl<A> Send for OpenSSLAcceptor<A>where
A: Send,
impl<A> Sync for OpenSSLAcceptor<A>where
A: Sync,
impl<A> Unpin for OpenSSLAcceptor<A>where
A: Unpin,
impl<A> UnwindSafe for OpenSSLAcceptor<A>where
A: 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