Function egg_mode::raw::response_as_stream[][src]

pub fn response_as_stream(req: Request<Body>) -> TwitterStream
Expand description

Converts the given request into a TwitterStream.

This function can be used for endpoints that open a persistent stream, like GET statuses/sample. If you know that the messages returned by the stream you’re using will look the same as StreamMessage, this can be a convenient way to customize a stream if you need to use other endpoints or options not available to StreamBuilder.

Since the TwitterStream type doesn’t need to provide additional parameters to the request, it can take a signed, completed request as its constructor.