Struct H2PeerSettingsHandle
pub struct H2PeerSettingsHandle { /* private fields */ }http-backend and http and std only.Expand description
Cloneable handle for querying the peer’s initial h2 SETTINGS frame
on an established connection. Obtained from
Connection::peer_settings_handle; survives the connection being
spawned so callers can spawn(conn) first and then await here.
The handle holds only an Arc to a small shared state cell — it
carries no reference to the request dispatcher. Retaining a
handle therefore does not prolong the underlying connection: once
the last SendRequest is dropped, the connection task shuts down
normally regardless of how many handles remain.
Implementations§
§impl H2PeerSettingsHandle
impl H2PeerSettingsHandle
pub fn snapshot(&self) -> Option<Arc<PeerH2Settings>>
pub fn snapshot(&self) -> Option<Arc<PeerH2Settings>>
Returns the peer’s initial SETTINGS frame, wrapped in
rama_http_types::conn::PeerH2Settings, if it has been
captured. None while the connection is still pre-SETTINGS, or
if the connection died before SETTINGS arrived.
pub async fn await_settings(&self) -> Option<Arc<PeerH2Settings>>
pub async fn await_settings(&self) -> Option<Arc<PeerH2Settings>>
Resolves to the peer’s initial SETTINGS once captured, or None
if the connection terminates before SETTINGS arrives. See
crate::h2::client::SendRequest::await_peer_initial_settings
for the underlying semantics — including the timeout caveat for
adversarial peers.
Trait Implementations§
§impl Clone for H2PeerSettingsHandle
impl Clone for H2PeerSettingsHandle
§fn clone(&self) -> H2PeerSettingsHandle
fn clone(&self) -> H2PeerSettingsHandle
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 Forget for H2PeerSettingsHandle
impl Freeze for H2PeerSettingsHandlewhere
*const ArcInner<PeerSettingsState> is !null: Freeze,
PhantomData<ArcInner<PeerSettingsState>>: Freeze,
impl Move for H2PeerSettingsHandle
impl RefUnwindSafe for H2PeerSettingsHandlewhere
Atomic<usize>: RefUnwindSafe,
OnceLock<Arc<PeerH2Settings>>: RefUnwindSafe,
Atomic<bool>: RefUnwindSafe,
Notify: RefUnwindSafe,
impl Send for H2PeerSettingsHandle
impl Sync for H2PeerSettingsHandle
impl Unpin for H2PeerSettingsHandle
impl UnsafeUnpin for H2PeerSettingsHandlewhere
*const ArcInner<PeerSettingsState> is !null: UnsafeUnpin,
PhantomData<ArcInner<PeerSettingsState>>: UnsafeUnpin,
impl UnwindSafe for H2PeerSettingsHandlewhere
Arc<PeerSettingsState>: UnwindSafe,
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