pub struct LocalListener { /* private fields */ }Expand description
A local IPC listener (Unix socket listener on Unix platforms).
Implementations§
Source§impl LocalListener
impl LocalListener
Sourcepub fn bind(path: impl AsRef<Path>) -> Result<Self>
pub fn bind(path: impl AsRef<Path>) -> Result<Self>
Bind to the given socket path.
The path should be a filesystem path where the socket file will be created. Parent directories must exist.
Sourcepub async fn accept(&self) -> Result<LocalStream>
pub async fn accept(&self) -> Result<LocalStream>
Accept a new connection.
Returns the stream for the new connection.
Auto Trait Implementations§
impl !Freeze for LocalListener
impl RefUnwindSafe for LocalListener
impl Send for LocalListener
impl Sync for LocalListener
impl Unpin for LocalListener
impl UnsafeUnpin for LocalListener
impl UnwindSafe for LocalListener
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