Struct SendRequest
pub struct SendRequest<B> { /* private fields */ }http-backend and http and std only.Expand description
Cloneable sender for a multiplexed HTTP/3 connection.
Implementations§
§impl<B> SendRequest<B>
impl<B> SendRequest<B>
pub const fn quic_connection(&self) -> &Connection
pub const fn quic_connection(&self) -> &Connection
Borrow the established transport for live QUIC statistics and path control.
pub async fn peer_settings(&self) -> Result<Settings, Error>
pub async fn peer_settings(&self) -> Result<Settings, Error>
Wait for the peer’s complete SETTINGS, preserving entry order and unknown IDs.
Run the driver concurrently and apply the caller’s handshake deadline. Cancelling this wait leaves the connection and other waiters intact. A connection failure before SETTINGS returns an error. The snapshot is cloned only when requested; observation need not be enabled.
pub fn connection_admission(&self) -> ConnectionAdmission
pub fn connection_admission(&self) -> ConnectionAdmission
Publish exact request admission for a multiplexing connection pool.
A checkout reserves local request capacity and peer QUIC stream credit. The request consumes its own ticket; abandoned checkouts return both. The policy holds a weak connection reference, avoiding an extension cycle.
pub fn datagram_drops(&self) -> DatagramDrops
pub fn datagram_drops(&self) -> DatagramDrops
Received HTTP/3 datagrams this connection discarded, by reason.
pub fn take_pushes(&self) -> Option<Pushes>
pub fn take_pushes(&self) -> Option<Pushes>
Take the opt-in push consumer once per connection, shared across sender clones.
pub fn is_draining(&self) -> bool
pub fn is_draining(&self) -> bool
Whether the peer has begun graceful shutdown.
pub fn closed_or_draining(&self) -> impl Future<Output = Error> + Send + 'static
pub fn closed_or_draining(&self) -> impl Future<Output = Error> + Send + 'static
Wait until the peer stops admitting requests or the connection fails. Active streams may continue after graceful shutdown begins.
§impl<B> SendRequest<B>
impl<B> SendRequest<B>
pub fn send_request(
&mut self,
request: Request<B>,
) -> impl Future<Output = Result<Response<Incoming>, Error>> + Send
pub fn send_request( &mut self, request: Request<B>, ) -> impl Future<Output = Result<Response<Incoming>, Error>> + Send
Send a request on its own bidirectional QUIC stream.
A request carrying a Protocol is sent as Extended CONNECT (RFC 9220) once the
server’s SETTINGS enable it; otherwise it fails locally before a stream is opened.
A successful (2xx) response exposes the tunnel through the upgrade API.
pub fn send_request_with_priority<F>(
&mut self,
request: Request<B>,
on_stream: F,
) -> impl Future<Output = Result<Response<Incoming>, Error>> + Send
pub fn send_request_with_priority<F>( &mut self, request: Request<B>, on_stream: F, ) -> impl Future<Output = Result<Response<Incoming>, Error>> + Send
Publish this request’s priority handle after opening its stream and before sending HEADERS or awaiting the response. Relays can translate downstream priority changes while the origin is still working. The callback runs once; cancellation before stream admission never calls it.
Trait Implementations§
§impl<B> Clone for SendRequest<B>
impl<B> Clone for SendRequest<B>
§fn clone(&self) -> SendRequest<B>
fn clone(&self) -> SendRequest<B>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl<B> !RefUnwindSafe for SendRequest<B>
impl<B> !UnwindSafe for SendRequest<B>
impl<B> Freeze for SendRequest<B>
impl<B> Send for SendRequest<B>
impl<B> Sync for SendRequest<B>
impl<B> Unpin for SendRequest<B>
impl<B> UnsafeUnpin for SendRequest<B>
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a rama_grpc::Request§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§fn and<P, B, E>(self, other: P) -> And<T, P>
fn and<P, B, E>(self, other: P) -> And<T, P>
Policy that returns Action::Follow only if self and other return
Action::Follow. Read more