Struct solicit::http::session::DefaultSessionState
[−]
[src]
pub struct DefaultSessionState<S> where S: Stream {
// some 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]
fn new() -> DefaultSessionState<S>
Creates a new DefaultSessionState with no known streams.
Trait Implementations
impl<S> SessionState for DefaultSessionState<S> where S: Stream[src]
type Stream = S
The type of the Stream that the SessionState manages.
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>
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>
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>
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
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>
Returns all streams that are closed and tracked by the session state. Read more