_

Trait _ 

Source
pub trait _:
    Sized
    + Send
    + Sync
    + Sealed {
    type Stream: Stream;

    // Required methods
    fn from_options(options: ListenerOptions<'_>) -> Result<Self, Error>;
    fn accept(
        &self,
    ) -> impl Future<Output = Result<Self::Stream, Error>> + Send + Sync;
    fn do_not_reclaim_name_on_drop(&mut self);
}
Expand description

Tokio local socket server implementations.

Types on which this trait is implemented are variants of the Listener enum. In addition, it is implemented on Listener itself, which makes it a trait object of sorts. See its documentation for more on the semantics of the methods seen here.

Required Associated Types§

Source

type Stream: Stream

The stream type associated with this listener.

Required Methods§

Source

fn from_options(options: ListenerOptions<'_>) -> Result<Self, Error>

Creates a socket server using the specified options.

Source

fn accept( &self, ) -> impl Future<Output = Result<Self::Stream, Error>> + Send + Sync

Asynchronously listens for incoming connections to the socket, returning a future that finishes only when a client is connected.

Source

fn do_not_reclaim_name_on_drop(&mut self)

Disables name reclamation on the listener.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl Listener for debugger::ipc::transport::platform::Listener

Source§

impl Listener for interprocess::os::unix::uds_local_socket::tokio::listener::Listener