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

pub struct DefaultStream {
    pub stream_id: Option<StreamId>,
    pub headers: Option<Vec<Header<'static, 'static>>>,
    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: Option<StreamId>

The ID of the stream, if already assigned by the connection.

headers: Option<Vec<Header<'static, 'static>>>

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

body: Vec<u8>

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

state: StreamState

The current stream state.

Implementations

impl DefaultStream[src]

pub fn new() -> DefaultStream[src]

Create a new DefaultStream, where the ID is not yet assigned.

pub fn with_id(stream_id: StreamId) -> DefaultStream[src]

Create a new DefaultStream with the given ID.

pub fn set_full_data(&mut self, data: Vec<u8>)[src]

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]

impl Stream for DefaultStream[src]

Auto Trait Implementations

impl RefUnwindSafe for DefaultStream

impl Send for DefaultStream

impl Sync for DefaultStream

impl Unpin for DefaultStream

impl UnwindSafe for DefaultStream

Blanket Implementations

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

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

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

impl<T> From<T> for T[src]

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

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

type Owned = T

The resulting type after obtaining ownership.

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

type Error = Infallible

The type returned in the event of a conversion error.

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

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.