Struct gain_listener::Listener [−][src]
Connection listener.
Fields
addr: Binding
Implementations
impl Listener
[src]
pub async fn bind_tls(opt: BindOptions<'_>) -> Result<Self, BindError>
[src]
Listen to TLS connections at BindOptions::port
. The fully-qualified
DNS name can be discovered from the Listener::addr.hostname
field.
If specified, BindOptions::prefix
is prepended to the server name.
Its length must be between 1 and 31 characters (inclusive), and it must
consist of lowercase alphanumeric ASCII characters and dash (-
). It
must not start or end with a dash. It must not start with xn--
.
pub async fn accept(&mut self) -> Result<Conn, AcceptError>
[src]
Accept a client connection. An AcceptErrorKind::Closed
error may
occur due to environmental causes.
pub fn split(self) -> (Acceptor, CloseStream)
[src]
Detach the closing functionality. When the CloseStream
is closed or
dropped, the Acceptor
will return an AcceptErrorKind::Closed
error.
Auto Trait Implementations
impl !RefUnwindSafe for Listener
impl !Send for Listener
impl !Sync for Listener
impl Unpin for Listener
impl !UnwindSafe for Listener
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,