[][src]Trait solicit::http::server::StreamFactory

pub trait StreamFactory {
    type Stream: Stream;
    fn create(&mut self, id: StreamId) -> Self::Stream;
}

The ServerSession requires an instance of a type that implements this trait in order to create a new Stream instance once it detects that a client has initiated a new stream. The factory should take care to provide an appropriate Stream implementation that will be able to handle reading the request and generating the response, according to the needs of the underlying application.

Associated Types

type Stream: Stream

Loading content...

Required methods

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

Create a new Stream with the given ID.

Loading content...

Implementors

Loading content...