pub struct Listener { /* private fields */ }
Expand description
Listening on a specific address and accepting connections from clients.
Implementations§
Source§impl Listener
impl Listener
Sourcepub fn socket_addr(&self) -> Result<SocketAddr, Error>
pub fn socket_addr(&self) -> Result<SocketAddr, Error>
Returns the local socket address of this listener.
Sourcepub async fn next(&mut self) -> ConnectionRequest
pub async fn next(&mut self) -> ConnectionRequest
Waiting for the next connection request.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Listener
impl !RefUnwindSafe for Listener
impl !Send for Listener
impl !Sync for Listener
impl Unpin for Listener
impl !UnwindSafe for Listener
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