Trait async_tls_acceptor::Acceptor [−][src]
This trait provides a common interface for server-side tls acceptors, abstracting over various implementations.
The only implementation provided by this crate is ()
, which is
a noop acceptor, and passes through the Input
type.
Implementing this trait looks like:
ⓘ
#[async_trait] impl<Input> Acceptor<Input> for my_tls_impl::Acceptor where Input: AsyncRead + AsyncWrite + Send + Sync + Unpin + 'static, { type Output = my_tls_impl::TlsStream<Input>; type Error = my_tls_impl::Error; async fn accept(&self, input: Input) -> Result<Self::Output, Self::Error> { self.accept(input).await } }
Associated Types
type Output: AsyncRead + AsyncWrite + Send + Sync + Unpin + 'static
[src]
The stream type. For example, TlsStream<Input>
type Error: Debug + Send + Sync
[src]
An error type that Acceptor::accept
may return
Required methods
#[must_use]fn accept<'life0, 'async_trait>(
&'life0 self,
input: Input
) -> Pin<Box<dyn Future<Output = Result<Self::Output, Self::Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
input: Input
) -> Pin<Box<dyn Future<Output = Result<Self::Output, Self::Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Transform an Input (AsyncRead + AsyncWrite + Send + Sync + Unpin + 'static
) into Self::Output
Async trait signature:
ⓘ
async fn accept(&self, input: Input) -> Result<Self::Output, Self::Error>;
Implementations on Foreign Types
impl<Input> Acceptor<Input> for () where
Input: AsyncRead + AsyncWrite + Send + Sync + Unpin + 'static,
[src]
Input: AsyncRead + AsyncWrite + Send + Sync + Unpin + 'static,
type Output = Input
type Error = Infallible
fn accept<'life0, 'async_trait>(
&'life0 self,
input: Input
) -> Pin<Box<dyn Future<Output = Result<Self::Output, Self::Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
input: Input
) -> Pin<Box<dyn Future<Output = Result<Self::Output, Self::Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,