pub struct SocketIncoming { /* private fields */ }
Expand description
A stream of connections from binding to a socket.
Implementations§
Source§impl SocketIncoming
impl SocketIncoming
Sourcepub fn bind(path: impl AsRef<Path>) -> Result<Self, Error>
pub fn bind(path: impl AsRef<Path>) -> Result<Self, Error>
Creates a new SocketIncoming
binding to provided socket path.
Sourcepub fn from_listener(listener: UnixListener) -> Self
pub fn from_listener(listener: UnixListener) -> Self
Creates a new SocketIncoming
from Tokio’s UnixListener
ⓘ
let socket = SocketIncoming::from_listener(unix_listener);
let server = Server::builder(socket).serve(service);
Trait Implementations§
Source§impl Accept for SocketIncoming
impl Accept for SocketIncoming
Source§type Conn = UnixStream
type Conn = UnixStream
The connection type that can be accepted.
Source§impl Debug for SocketIncoming
impl Debug for SocketIncoming
Source§impl From<UnixListener> for SocketIncoming
impl From<UnixListener> for SocketIncoming
Source§fn from(listener: UnixListener) -> Self
fn from(listener: UnixListener) -> Self
Converts to this type from the input type.
impl<'pin> Unpin for SocketIncomingwhere
__SocketIncoming<'pin>: Unpin,
Auto Trait Implementations§
impl !Freeze for SocketIncoming
impl RefUnwindSafe for SocketIncoming
impl Send for SocketIncoming
impl Sync for SocketIncoming
impl UnwindSafe for SocketIncoming
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