Struct solicit::http::session::DefaultStream
[−]
[src]
pub struct DefaultStream { pub stream_id: StreamId, pub headers: Option<Vec<Header>>, pub body: Vec<u8>, pub state: StreamState, // some fields omitted }
An implementation of the Stream
trait that saves all headers and data
in memory.
Stores its outgoing data as a Vec<u8>
.
Fields
stream_id | The ID of the stream |
headers | The headers associated with the stream (i.e. the response headers) |
body | The body of the stream (i.e. the response body) |
state | The current stream state. |
Methods
impl DefaultStream
fn new(stream_id: StreamId) -> DefaultStream
Create a new DefaultStream
with the given ID.
fn set_full_data(&mut self, data: Vec<u8>)
Sets the outgoing data of the stream to the given Vec
.
Any previously associated (and perhaps unwritten) data is discarded.