pub struct TlsListener { /* private fields */ }Expand description
accept as a listener for axum::serve
Implementations§
Source§impl TlsListener
impl TlsListener
Sourcepub fn new(listener: TcpListener, configs: Arc<TlsConfigs>) -> Result<Self>
pub fn new(listener: TcpListener, configs: Arc<TlsConfigs>) -> Result<Self>
Accept TLS connections on listener with the HTTP protocols, as accept does
Trait Implementations§
Source§impl Listener for TlsListener
impl Listener for TlsListener
Source§type Io = TlsConnection
type Io = TlsConnection
The listener’s IO type.
Source§type Addr = SocketAddr
type Addr = SocketAddr
The listener’s address type.
Source§async fn accept(&mut self) -> (Self::Io, Self::Addr)
async fn accept(&mut self) -> (Self::Io, Self::Addr)
Accept a new incoming connection to this listener. Read more
Source§fn local_addr(&self) -> Result<Self::Addr>
fn local_addr(&self) -> Result<Self::Addr>
Returns the local address that this listener is bound to.
Auto Trait Implementations§
impl Freeze for TlsListener
impl RefUnwindSafe for TlsListener
impl Send for TlsListener
impl Sync for TlsListener
impl Unpin for TlsListener
impl UnsafeUnpin for TlsListener
impl UnwindSafe for TlsListener
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request