tokio_util/net/unix/
mod.rs

1//! Unix domain socket helpers.
2
3use super::Listener;
4use std::io::Result;
5use std::task::{Context, Poll};
6
7impl Listener for tokio::net::UnixListener {
8    type Io = tokio::net::UnixStream;
9    type Addr = tokio::net::unix::SocketAddr;
10
11    fn poll_accept(&mut self, cx: &mut Context<'_>) -> Poll<Result<(Self::Io, Self::Addr)>> {
12        Self::poll_accept(self, cx)
13    }
14
15    fn local_addr(&self) -> Result<Self::Addr> {
16        self.local_addr().map(Into::into)
17    }
18}