pub struct ListenerOptions<'n> { /* private fields */ }pubsub and ipc only.Expand description
A builder for local socket listeners, including Listener.
Implementations§
Source§impl ListenerOptions<'_>
Creation.
impl ListenerOptions<'_>
Creation.
Sourcepub fn new() -> ListenerOptions<'_>
pub fn new() -> ListenerOptions<'_>
Creates an options table with default values.
Source§impl<'n> ListenerOptions<'n>
Option setters.
impl<'n> ListenerOptions<'n>
Option setters.
Sourcepub fn name(self, name: Name<'n>) -> ListenerOptions<'n>
pub fn name(self, name: Name<'n>) -> ListenerOptions<'n>
Sets the name the server will listen on.
Sourcepub fn nonblocking(
self,
nonblocking: ListenerNonblockingMode,
) -> ListenerOptions<'n>
pub fn nonblocking( self, nonblocking: ListenerNonblockingMode, ) -> ListenerOptions<'n>
Selects the nonblocking mode to be used by the listener.
The default value is Neither.
Sourcepub fn reclaim_name(self, reclaim_name: bool) -> ListenerOptions<'n>
pub fn reclaim_name(self, reclaim_name: bool) -> ListenerOptions<'n>
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, Error>
pub fn create_sync(self) -> Result<Listener, Error>
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>(self) -> Result<L, Error>where
L: Listener,
pub fn create_sync_as<L>(self) -> Result<L, Error>where
L: Listener,
Creates the given type of listener, binding it to the specified local socket name.
Sourcepub fn create_tokio(self) -> Result<Listener, Error>
pub fn create_tokio(self) -> Result<Listener, Error>
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>(self) -> Result<L, Error>where
L: Listener,
pub fn create_tokio_as<L>(self) -> Result<L, Error>where
L: Listener,
Creates the given type of listener, binding it to the specified local socket name.