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

The ID of the stream

The headers associated with the stream (i.e. the response headers)

The body of the stream (i.e. the response body)

The current stream state.

Methods

impl DefaultStream
[src]

Create a new DefaultStream with the given ID.

Sets the outgoing data of the stream to the given Vec.

Any previously associated (and perhaps unwritten) data is discarded.

Trait Implementations

impl Clone for DefaultStream
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Stream for DefaultStream
[src]

Create a new stream with the given ID

Handle a new data chunk that has arrived for the stream.

Set headers for a stream. A stream is only allowed to have one set of headers. Read more

Sets the stream state to the newly provided state.

Returns the ID of the stream.

Returns the current state of the stream.

Places the next data chunk that should be written onto the stream into the given buffer. Read more

Transitions the stream state to closed. After this, the stream is considered to be closed for any further reads or writes. Read more

Updates the Stream status to indicate that it is closed locally. Read more

Updates the Stream status to indicate that it is closed on the remote peer's side. Read more

Returns whether the stream is closed. Read more

Returns whether the stream is closed locally.

Returns whether the remote peer has closed the stream. This includes a fully closed stream.

Auto Trait Implementations

impl Send for DefaultStream

impl Sync for DefaultStream