[][src]Struct solicit::http::session::DefaultStream

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 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.

impl Clone for DefaultStream
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl Send for DefaultStream

impl Sync for DefaultStream

Blanket Implementations

impl<T> From for T
[src]

Performs the conversion.

impl<T, U> Into for T where
    U: From<T>, 
[src]

Performs the conversion.

impl<T> ToOwned for T where
    T: Clone
[src]

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

🔬 This is a nightly-only experimental API. (try_from)

Performs the conversion.

impl<T> Borrow for T where
    T: ?Sized
[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut for T where
    T: ?Sized
[src]

Mutably borrows from an owned value. Read more

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

🔬 This is a nightly-only experimental API. (try_from)

Performs the conversion.

impl<T> Any for T where
    T: 'static + ?Sized
[src]

🔬 This is a nightly-only experimental API. (get_type_id)

this method will likely be replaced by an associated static

Gets the TypeId of self. Read more