[−][src]Struct solicit::http::session::DefaultStream
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]
fn clone(&self) -> DefaultStream
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Stream for DefaultStream
[src]
fn new_data_chunk(&mut self, data: &[u8])
[src]
fn set_headers<'n, 'v>(&mut self, headers: Vec<Header<'n, 'v>>)
[src]
fn set_state(&mut self, state: StreamState)
[src]
fn state(&self) -> StreamState
[src]
fn get_data_chunk(
&mut self,
buf: &mut [u8]
) -> Result<StreamDataChunk, StreamDataError>
[src]
&mut self,
buf: &mut [u8]
) -> Result<StreamDataChunk, StreamDataError>
fn on_rst_stream(&mut self, _error_code: ErrorCode)
[src]
fn close(&mut self)
[src]
fn close_local(&mut self)
[src]
fn close_remote(&mut self)
[src]
fn is_closed(&self) -> bool
[src]
fn is_closed_local(&self) -> bool
[src]
fn is_closed_remote(&self) -> bool
[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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,