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.

Implementors§

Source§

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

Source§

type Item = <T as Stream>::Item