pub struct UnixListenerBuilder<S> { /* private fields */ }Available on
target_family="unix" only.Expand description
Builder for UnixListener.
Implementations§
Source§impl UnixListenerBuilder<()>
impl UnixListenerBuilder<()>
Source§impl<S> UnixListenerBuilder<S>
impl<S> UnixListenerBuilder<S>
Sourcepub fn with_state(state: S) -> Self
pub fn with_state(state: S) -> Self
Create a new TcpListenerBuilder with the given state.
Source§impl<S> UnixListenerBuilder<S>
impl<S> UnixListenerBuilder<S>
Sourcepub async fn bind_path(
self,
path: impl AsRef<Path>,
) -> Result<UnixListener<S>, Error>
pub async fn bind_path( self, path: impl AsRef<Path>, ) -> Result<UnixListener<S>, Error>
Creates a new UnixListener, which will be bound to the specified path.
The returned listener is ready for accepting connections.
Sourcepub fn bind_socket(self, socket: Socket) -> Result<UnixListener<S>, Error>
pub fn bind_socket(self, socket: Socket) -> Result<UnixListener<S>, Error>
Creates a new UnixListener, which will be bound to the specified socket.
The returned listener is ready for accepting connections.
Sourcepub async fn bind_socket_opts(
self,
opts: SocketOptions,
) -> Result<UnixListener<S>, BoxError>
Available on Android or Fuchsia or Linux only.
pub async fn bind_socket_opts( self, opts: SocketOptions, ) -> Result<UnixListener<S>, BoxError>
Creates a new TcpListener, which will be bound to the specified interface.
The returned listener is ready for accepting connections.
Trait Implementations§
Source§impl<S: Clone> Clone for UnixListenerBuilder<S>
impl<S: Clone> Clone for UnixListenerBuilder<S>
Source§impl<S> Debug for UnixListenerBuilder<S>where
S: Debug,
impl<S> Debug for UnixListenerBuilder<S>where
S: Debug,
Auto Trait Implementations§
impl<S> Freeze for UnixListenerBuilder<S>where
S: Freeze,
impl<S> RefUnwindSafe for UnixListenerBuilder<S>where
S: RefUnwindSafe,
impl<S> Send for UnixListenerBuilder<S>where
S: Send,
impl<S> Sync for UnixListenerBuilder<S>where
S: Sync,
impl<S> Unpin for UnixListenerBuilder<S>where
S: Unpin,
impl<S> UnwindSafe for UnixListenerBuilder<S>where
S: UnwindSafe,
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