pub struct UnixListener<IO: AsyncIO> { /* private fields */ }Expand description
A Unix domain socket listener that implements AsyncListener.
Implementations§
Source§impl<IO: AsyncIO> UnixListener<IO>
impl<IO: AsyncIO> UnixListener<IO>
Sourcepub fn from_std(listener: StdUnixListener) -> Result<Self>
pub fn from_std(listener: StdUnixListener) -> Result<Self>
Create a new UnixListener from a std UnixListener.
Sourcepub async fn accept(&mut self) -> Result<UnixStream<IO>>
pub async fn accept(&mut self) -> Result<UnixStream<IO>>
Accept a new connection.
Sourcepub fn local_addr(&self) -> Result<String>
pub fn local_addr(&self) -> Result<String>
Get the local address of the listener.
Sourcepub unsafe fn try_from_raw_fd(addr: &str, raw_fd: RawFd) -> Result<Self>
pub unsafe fn try_from_raw_fd(addr: &str, raw_fd: RawFd) -> Result<Self>
Trait Implementations§
Source§impl<IO: AsyncIO> AsRawFd for UnixListener<IO>
impl<IO: AsyncIO> AsRawFd for UnixListener<IO>
Auto Trait Implementations§
impl<IO> Freeze for UnixListener<IO>
impl<IO> RefUnwindSafe for UnixListener<IO>
impl<IO> Send for UnixListener<IO>
impl<IO> Sync for UnixListener<IO>
impl<IO> Unpin for UnixListener<IO>
impl<IO> UnsafeUnpin for UnixListener<IO>
impl<IO> UnwindSafe for UnixListener<IO>
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