[−][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.
Implementations
impl<S> DefaultSessionState<Client, S> where
S: Stream,
[src]
S: Stream,
pub fn new() -> DefaultSessionState<Client, S>
[src]
Creates a new DefaultSessionState
for a client session with no known streams.
impl<S> DefaultSessionState<Server, S> where
S: Stream,
[src]
S: Stream,
pub fn new() -> DefaultSessionState<Server, S>
[src]
Creates a new DefaultSessionState
for a server session with no known streams.
Trait Implementations
impl<T, S> SessionState for DefaultSessionState<T, S> where
S: Stream,
[src]
S: Stream,
type Stream = S
The type of the Stream
that the SessionState
manages.
fn insert_outgoing(&mut self, stream: Self::Stream) -> StreamId
[src]
fn insert_incoming(
&mut self,
stream_id: StreamId,
stream: Self::Stream
) -> Result<(), ()>
[src]
&mut self,
stream_id: StreamId,
stream: Self::Stream
) -> Result<(), ()>
fn get_stream_ref(&self, stream_id: StreamId) -> Option<&Self::Stream>
[src]
fn get_stream_mut(&mut self, stream_id: StreamId) -> Option<&mut Self::Stream>
[src]
fn remove_stream(&mut self, stream_id: StreamId) -> Option<Self::Stream>
[src]
fn iter(&mut self) -> StreamIter<S>
[src]
fn len(&self) -> usize
[src]
Number of currently active streams
fn get_closed(&mut self) -> Vec<Self::Stream>
[src]
Auto Trait Implementations
impl<T, S> RefUnwindSafe for DefaultSessionState<T, S> where
S: RefUnwindSafe,
T: RefUnwindSafe,
S: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, S> Send for DefaultSessionState<T, S> where
S: Send,
T: Send,
S: Send,
T: Send,
impl<T, S> Sync for DefaultSessionState<T, S> where
S: Sync,
T: Sync,
S: Sync,
T: Sync,
impl<T, S> Unpin for DefaultSessionState<T, S> where
S: Unpin,
T: Unpin,
S: Unpin,
T: Unpin,
impl<T, S> UnwindSafe for DefaultSessionState<T, S> where
S: UnwindSafe,
T: UnwindSafe,
S: UnwindSafe,
T: UnwindSafe,
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, 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>,