[−][src]Struct solicit::http::client::ClientConnection
The struct extends the HttpConnection
API with client-specific methods (such as
start_request
) and wires the HttpConnection
to the client Session
callbacks.
Fields
state: State
The state of the session associated to this client connection. Maintains the status of the connection streams.
Implementations
impl<State> ClientConnection<State> where
State: SessionState,
[src]
State: SessionState,
pub fn with_connection(
conn: HttpConnection,
state: State
) -> ClientConnection<State>
[src]
conn: HttpConnection,
state: State
) -> ClientConnection<State>
Creates a new ClientConnection
that will use the given HttpConnection
for all its underlying HTTP/2 communication.
The given state
instance will handle the maintenance of the session's state.
pub fn scheme(&self) -> HttpScheme
[src]
Returns the scheme of the underlying HttpConnection
.
pub fn expect_settings<Recv: ReceiveFrame, Sender: SendFrame>(
&mut self,
rx: &mut Recv,
tx: &mut Sender
) -> HttpResult<()>
[src]
&mut self,
rx: &mut Recv,
tx: &mut Sender
) -> HttpResult<()>
Handles the next frame provided by the given frame receiver and expects it to be a
SETTINGS
frame. If it is not, it returns an error.
The method is a convenience method that can be used during the initialization of the connection, as the first frame that any peer is allowed to send is an initial settings frame.
pub fn start_request<S: SendFrame>(
&mut self,
req: RequestStream<State::Stream>,
sender: &mut S
) -> HttpResult<StreamId>
[src]
&mut self,
req: RequestStream<State::Stream>,
sender: &mut S
) -> HttpResult<StreamId>
Starts a new request based on the given RequestStream
.
For now it does not perform any validation whether the given RequestStream
is valid.
pub fn send_ping<S: SendFrame>(&mut self, sender: &mut S) -> HttpResult<()>
[src]
Send a PING
pub fn handle_next_frame<Recv: ReceiveFrame, Sender: SendFrame>(
&mut self,
rx: &mut Recv,
tx: &mut Sender
) -> HttpResult<()>
[src]
&mut self,
rx: &mut Recv,
tx: &mut Sender
) -> HttpResult<()>
Fully handles the next incoming frame provided by the given ReceiveFrame
instance.
Handling a frame may cause changes to the session state exposed by the ClientConnection
.
pub fn send_next_data<S: SendFrame>(
&mut self,
sender: &mut S
) -> HttpResult<SendStatus>
[src]
&mut self,
sender: &mut S
) -> HttpResult<SendStatus>
Queues a new DATA frame onto the underlying SendFrame
.
Currently, no prioritization of streams is taken into account and which stream's data is queued cannot be relied on.
Auto Trait Implementations
impl<State> RefUnwindSafe for ClientConnection<State> where
State: RefUnwindSafe,
State: RefUnwindSafe,
impl<State> Send for ClientConnection<State> where
State: Send,
State: Send,
impl<State> Sync for ClientConnection<State> where
State: Sync,
State: Sync,
impl<State> Unpin for ClientConnection<State> where
State: Unpin,
State: Unpin,
impl<State> UnwindSafe for ClientConnection<State> where
State: UnwindSafe,
State: 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>,