Struct mas_listener::maybe_tls::MaybeTlsAcceptor
source · pub struct MaybeTlsAcceptor { /* private fields */ }
Implementations§
source§impl MaybeTlsAcceptor
impl MaybeTlsAcceptor
pub fn new(tls_config: Option<Arc<ServerConfig>>) -> Self
pub fn new_secure(tls_config: Arc<ServerConfig>) -> Self
pub fn new_insecure() -> Self
pub const fn is_secure(&self) -> bool
sourcepub async fn accept<T>(&self, stream: T) -> Result<MaybeTlsStream<T>, Error>
pub async fn accept<T>(&self, stream: T) -> Result<MaybeTlsStream<T>, Error>
Trait Implementations§
source§impl Clone for MaybeTlsAcceptor
impl Clone for MaybeTlsAcceptor
source§fn clone(&self) -> MaybeTlsAcceptor
fn clone(&self) -> MaybeTlsAcceptor
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 Freeze for MaybeTlsAcceptor
impl !RefUnwindSafe for MaybeTlsAcceptor
impl Send for MaybeTlsAcceptor
impl Sync for MaybeTlsAcceptor
impl Unpin for MaybeTlsAcceptor
impl !UnwindSafe for MaybeTlsAcceptor
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)