[−][src]Struct solicit::http::session::DefaultSessionState
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,
Blanket Implementations
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
try_from
)Performs the conversion.
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
try_from
)Performs the conversion.
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId
[src]
fn get_type_id(&self) -> TypeId
🔬 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