Struct solicit::http::session::DefaultSessionState [−][src]
pub struct DefaultSessionState<S> where
S: Stream, { /* fields omitted */ }
An implementation of the SessionState
trait that tracks the active streams in a HashMap
,
mapping the stream ID to the concrete Stream
instance.
Methods
impl<S> DefaultSessionState<S> where
S: Stream,
[src]
impl<S> DefaultSessionState<S> where
S: Stream,
pub fn new() -> DefaultSessionState<S>
[src]
pub fn new() -> DefaultSessionState<S>
Creates a new DefaultSessionState
with no known streams.
Trait Implementations
impl<S> SessionState for DefaultSessionState<S> where
S: Stream,
[src]
impl<S> SessionState for DefaultSessionState<S> where
S: Stream,
type Stream = S
The type of the Stream
that the SessionState
manages.
fn insert_stream(&mut self, stream: Self::Stream)
[src]
fn insert_stream(&mut self, stream: Self::Stream)
Inserts the given Stream
into the session's state, starting to track it.
fn get_stream_ref(&self, stream_id: StreamId) -> Option<&Self::Stream>
[src]
fn get_stream_ref(&self, stream_id: StreamId) -> Option<&Self::Stream>
Returns a reference to a Stream
with the given StreamId
, if it is found in the current session. Read more
fn get_stream_mut(&mut self, stream_id: StreamId) -> Option<&mut Self::Stream>
[src]
fn get_stream_mut(&mut self, stream_id: StreamId) -> Option<&mut Self::Stream>
Returns a mutable reference to a Stream
with the given StreamId
, if it is found in the current session. Read more
fn remove_stream(&mut self, stream_id: StreamId) -> Option<Self::Stream>
[src]
fn remove_stream(&mut self, stream_id: StreamId) -> Option<Self::Stream>
Removes the stream with the given StreamId
from the session. If the stream was found in the session, it is returned in the result. Read more
ⓘImportant traits for StreamIter<'a, S>fn iter(&mut self) -> StreamIter<S>
[src]
fn iter(&mut self) -> StreamIter<S>
Returns an iterator over the streams currently found in the session.
fn get_closed(&mut self) -> Vec<Self::Stream>
[src]
fn get_closed(&mut self) -> Vec<Self::Stream>
Returns all streams that are closed and tracked by the session state. Read more
Auto Trait Implementations
impl<S> Send for DefaultSessionState<S> where
S: Send,
impl<S> Send for DefaultSessionState<S> where
S: Send,
impl<S> Sync for DefaultSessionState<S> where
S: Sync,
impl<S> Sync for DefaultSessionState<S> where
S: Sync,