pub struct ListenerOptions<'n> { /* private fields */ }
Expand description
A builder for local socket listeners, including Listener
.
Implementations§
Source§impl ListenerOptions<'_>
Creation.
impl ListenerOptions<'_>
Creation.
Source§impl<'n> ListenerOptions<'n>
Option setters.
impl<'n> ListenerOptions<'n>
Option setters.
Sourcepub fn nonblocking(self, nonblocking: ListenerNonblockingMode) -> Self
pub fn nonblocking(self, nonblocking: ListenerNonblockingMode) -> Self
Selects the nonblocking mode to be used by the listener.
The default value is Neither
.
Sourcepub fn reclaim_name(self, reclaim_name: bool) -> Self
pub fn reclaim_name(self, reclaim_name: bool) -> Self
Sets whether name reclamation is to happen or not.
This is enabled by default.
Source§impl ListenerOptions<'_>
Listener constructors.
impl ListenerOptions<'_>
Listener constructors.
Sourcepub fn create_sync(self) -> Result<Listener>
pub fn create_sync(self) -> Result<Listener>
Creates a Listener
, binding it to the specified local socket name.
On platforms where there are multiple available implementations, this dispatches to the appropriate implementation based on where the name points to.
Sourcepub fn create_sync_as<L: Listener>(self) -> Result<L>
pub fn create_sync_as<L: Listener>(self) -> Result<L>
Creates the given type of listener, binding it to the specified local socket name.
Sourcepub fn create_tokio(self) -> Result<TokioListener>
pub fn create_tokio(self) -> Result<TokioListener>
Creates a Listener
, binding it to the specified local socket name.
On platforms where there are multiple available implementations, this dispatches to the appropriate implementation based on where the name points to.
Sourcepub fn create_tokio_as<L: Listener>(self) -> Result<L>
pub fn create_tokio_as<L: Listener>(self) -> Result<L>
Creates the given type of listener, binding it to the specified local socket name.