Struct trillium_native_tls::NativeTlsAcceptor
source · pub struct NativeTlsAcceptor(/* private fields */);
Expand description
trillium [Acceptor
] for native-tls
Implementations§
source§impl NativeTlsAcceptor
impl NativeTlsAcceptor
sourcepub fn new(t: impl Into<Self>) -> Self
pub fn new(t: impl Into<Self>) -> Self
constructs a NativeTlsAcceptor from a native_tls::TlsAcceptor
,
an [async_native_tls::TlsAcceptor
], or an Identity
sourcepub fn from_pkcs12(der: &[u8], password: &str) -> Self
pub fn from_pkcs12(der: &[u8], password: &str) -> Self
constructs a NativeTlsAcceptor from a pkcs12 key and password. See
See Identity::from_pkcs8
sourcepub fn from_pkcs8(pem: &[u8], key: &[u8]) -> Self
pub fn from_pkcs8(pem: &[u8], key: &[u8]) -> Self
constructs a NativeTlsAcceptor from a pkcs8 pem and private
key. See Identity::from_pkcs8
Trait Implementations§
source§impl<Input> Acceptor<Input> for NativeTlsAcceptorwhere
Input: Transport,
impl<Input> Acceptor<Input> for NativeTlsAcceptorwhere
Input: Transport,
§type Output = NativeTlsTransport<Input>
type Output = NativeTlsTransport<Input>
The stream type. For example,
TlsStream<Input>
source§fn accept<'life0, 'async_trait>(
&'life0 self,
input: Input
) -> Pin<Box<dyn Future<Output = Result<Self::Output, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn accept<'life0, 'async_trait>(
&'life0 self,
input: Input
) -> Pin<Box<dyn Future<Output = Result<Self::Output, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Transform an Input (
AsyncRead + AsyncWrite + Send + Sync + Unpin + 'static
) into Self::Output Read moresource§impl Clone for NativeTlsAcceptor
impl Clone for NativeTlsAcceptor
source§fn clone(&self) -> NativeTlsAcceptor
fn clone(&self) -> NativeTlsAcceptor
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 moresource§impl Debug for NativeTlsAcceptor
impl Debug for NativeTlsAcceptor
source§impl From<Identity> for NativeTlsAcceptor
impl From<Identity> for NativeTlsAcceptor
source§impl From<TlsAcceptor> for NativeTlsAcceptor
impl From<TlsAcceptor> for NativeTlsAcceptor
source§fn from(i: TlsAcceptor) -> Self
fn from(i: TlsAcceptor) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl RefUnwindSafe for NativeTlsAcceptor
impl Send for NativeTlsAcceptor
impl Sync for NativeTlsAcceptor
impl Unpin for NativeTlsAcceptor
impl UnwindSafe for NativeTlsAcceptor
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