Struct tokio_rustls::TlsAcceptor
source · [−]pub struct TlsAcceptor { /* private fields */ }
Expand description
A wrapper around a rustls::ServerConfig
, providing an async accept
method.
Implementations
sourceimpl TlsAcceptor
impl TlsAcceptor
pub fn accept<IO>(&self, stream: IO) -> Accept<IO>ⓘNotable traits for Accept<IO>impl<IO: AsyncRead + AsyncWrite + Unpin> Future for Accept<IO> type Output = Result<TlsStream<IO>>;
where
IO: AsyncRead + AsyncWrite + Unpin,
pub fn accept_with<IO, F>(&self, stream: IO, f: F) -> Accept<IO>ⓘNotable traits for Accept<IO>impl<IO: AsyncRead + AsyncWrite + Unpin> Future for Accept<IO> type Output = Result<TlsStream<IO>>;
where
IO: AsyncRead + AsyncWrite + Unpin,
F: FnOnce(&mut ServerConnection),
Trait Implementations
sourceimpl Clone for TlsAcceptor
impl Clone for TlsAcceptor
sourcefn clone(&self) -> TlsAcceptor
fn clone(&self) -> TlsAcceptor
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl From<Arc<ServerConfig>> for TlsAcceptor
impl From<Arc<ServerConfig>> for TlsAcceptor
sourcefn from(inner: Arc<ServerConfig>) -> TlsAcceptor
fn from(inner: Arc<ServerConfig>) -> TlsAcceptor
Converts to this type from the input type.
Auto Trait Implementations
impl !RefUnwindSafe for TlsAcceptor
impl Send for TlsAcceptor
impl Sync for TlsAcceptor
impl Unpin for TlsAcceptor
impl !UnwindSafe for TlsAcceptor
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more