StreamFactory

Trait StreamFactory 

Source
pub trait StreamFactory {
    type Stream;

    // Required method
    fn create(&mut self) -> Self::Stream;
}
Expand description

Trait for creating streams, used by the stream pool to generate streams as needed.

Required Associated Types§

Source

type Stream

The type of stream produced by this factory.

Required Methods§

Source

fn create(&mut self) -> Self::Stream

Creates a new stream instance.

Implementors§