Struct Connection
pub struct Connection<C> { /* private fields */ }http-backend and http and std only.Expand description
Accepts request streams; the accompanying driver must run concurrently.
Implementations§
§impl<C> Connection<C>where
C: Connection,
impl<C> Connection<C>where
C: Connection,
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 datagram_drops(&self) -> DatagramDrops
pub fn datagram_drops(&self) -> DatagramDrops
Received HTTP/3 datagrams this connection discarded, by reason.
pub fn shutdown(&mut self) -> Result<(), Error>
pub fn shutdown(&mut self) -> Result<(), Error>
Stop admitting requests and notify the peer while accepted streams finish.
pub async fn drained(&self) -> Result<(), Error>
pub async fn drained(&self) -> Result<(), Error>
Wait for accepted bodies, push senders and upgraded tunnels to be released, including acknowledgement of response FINs, and for the queued GOAWAY to be handed to QUIC. Run the driver concurrently. Apply a shutdown deadline around this operation when the peer may stop acknowledging data.
pub async fn accept(&mut self) -> Result<RequestStream<C>, Error>
pub async fn accept(&mut self) -> Result<RequestStream<C>, Error>
Accept the next stream without waiting for its headers. Resolve each returned stream independently so a blocked QPACK section cannot hold up other requests.
Auto Trait Implementations§
impl<C> !RefUnwindSafe for Connection<C>
impl<C> !UnwindSafe for Connection<C>
impl<C> Freeze for Connection<C>where
C: Freeze,
impl<C> Send for Connection<C>where
C: Send,
impl<C> Sync for Connection<C>where
C: Sync,
impl<C> Unpin for Connection<C>where
C: Unpin,
impl<C> UnsafeUnpin for Connection<C>where
C: UnsafeUnpin,
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
§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