[−][src]Struct solicit::http::client::ClientSession
An implementation of the Session
trait specific to handling client HTTP/2 connections.
While handling the events signaled by the HttpConnection
, the struct will modify the given
session state appropriately.
The purpose of the type is to make it easier for client implementations to
only handle stream-level events by providing a Stream
implementation,
instead of having to implement all session management callbacks.
For example, by varying the Stream
implementation it is easy to implement
a client that streams responses directly into a file on the local file system,
instead of keeping it in memory (like the DefaultStream
does), without
having to change any HTTP/2-specific logic.
Implementations
impl<'a, State, S> ClientSession<'a, State, S> where
State: SessionState + 'a,
S: SendFrame + 'a,
[src]
State: SessionState + 'a,
S: SendFrame + 'a,
pub fn new(
state: &'a mut State,
sender: &'a mut S
) -> ClientSession<'a, State, S>
[src]
state: &'a mut State,
sender: &'a mut S
) -> ClientSession<'a, State, S>
Returns a new ClientSession
associated to the given state.
Trait Implementations
impl<'a, State, S> Session for ClientSession<'a, State, S> where
State: SessionState + 'a,
S: SendFrame + 'a,
[src]
State: SessionState + 'a,
S: SendFrame + 'a,
fn new_data_chunk(
&mut self,
stream_id: StreamId,
data: &[u8],
_: &mut HttpConnection
) -> HttpResult<()>
[src]
&mut self,
stream_id: StreamId,
data: &[u8],
_: &mut HttpConnection
) -> HttpResult<()>
fn new_headers<'n, 'v>(
&mut self,
stream_id: StreamId,
headers: Vec<Header<'n, 'v>>,
_conn: &mut HttpConnection
) -> HttpResult<()>
[src]
&mut self,
stream_id: StreamId,
headers: Vec<Header<'n, 'v>>,
_conn: &mut HttpConnection
) -> HttpResult<()>
fn end_of_stream(
&mut self,
stream_id: StreamId,
_: &mut HttpConnection
) -> HttpResult<()>
[src]
&mut self,
stream_id: StreamId,
_: &mut HttpConnection
) -> HttpResult<()>
fn rst_stream(
&mut self,
stream_id: StreamId,
error_code: ErrorCode,
_: &mut HttpConnection
) -> HttpResult<()>
[src]
&mut self,
stream_id: StreamId,
error_code: ErrorCode,
_: &mut HttpConnection
) -> HttpResult<()>
fn new_settings(
&mut self,
_settings: Vec<HttpSetting>,
conn: &mut HttpConnection
) -> HttpResult<()>
[src]
&mut self,
_settings: Vec<HttpSetting>,
conn: &mut HttpConnection
) -> HttpResult<()>
fn on_ping(
&mut self,
ping: &PingFrame,
conn: &mut HttpConnection
) -> HttpResult<()>
[src]
&mut self,
ping: &PingFrame,
conn: &mut HttpConnection
) -> HttpResult<()>
fn on_pong(
&mut self,
_ping: &PingFrame,
_conn: &mut HttpConnection
) -> HttpResult<()>
[src]
&mut self,
_ping: &PingFrame,
_conn: &mut HttpConnection
) -> HttpResult<()>
fn on_goaway(
&mut self,
_last_stream_id: StreamId,
error_code: ErrorCode,
debug_data: Option<&[u8]>,
_conn: &mut HttpConnection
) -> HttpResult<()>
[src]
&mut self,
_last_stream_id: StreamId,
error_code: ErrorCode,
debug_data: Option<&[u8]>,
_conn: &mut HttpConnection
) -> HttpResult<()>
Auto Trait Implementations
impl<'a, State, S> RefUnwindSafe for ClientSession<'a, State, S> where
S: RefUnwindSafe,
State: RefUnwindSafe,
S: RefUnwindSafe,
State: RefUnwindSafe,
impl<'a, State, S> Send for ClientSession<'a, State, S> where
S: Send,
State: Send,
S: Send,
State: Send,
impl<'a, State, S> Sync for ClientSession<'a, State, S> where
S: Sync,
State: Sync,
S: Sync,
State: Sync,
impl<'a, State, S> Unpin for ClientSession<'a, State, S>
impl<'a, State, S> !UnwindSafe for ClientSession<'a, State, S>
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>,