Skip to main content

ConnectionStream

Trait ConnectionStream 

Source
pub trait ConnectionStream {
    type Item: Connection;

    // Required method
    fn poll_next(&mut self) -> Poll<Option<Self::Item>, Error>;
}
Expand description

An asynchronous stream of connections.

Required Associated Types§

Source

type Item: Connection

Connection type yielded each iteration.

Required Methods§

Source

fn poll_next(&mut self) -> Poll<Option<Self::Item>, Error>

Attempt to resolve the next connection, registering the current task for wakeup if one is not yet available.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<T> ConnectionStream for T
where T: Stream<Error = Error>, T::Item: Connection,

Source§

type Item = <T as Stream>::Item