Struct EarlyFrameStreamContext
pub struct EarlyFrameStreamContext { /* private fields */ }http-backend and http and std only.Implementations§
§impl EarlyFrameStreamContext
impl EarlyFrameStreamContext
pub fn new_nop() -> EarlyFrameStreamContext
pub fn new_recorder() -> EarlyFrameStreamContext
pub fn new_replayer(
frames: Vec<EarlyFrame>,
) -> (EarlyFrameStreamContext, Option<Settings>)
pub fn new_replayer( frames: Vec<EarlyFrame>, ) -> (EarlyFrameStreamContext, Option<Settings>)
Replay frames, the client’s captured start of a connection.
A captured stream WINDOW_UPDATE follows the HEADERS of the first request, and browsers that send one raise every stream’s window that way. It is replayed as that policy: the same increment right after the HEADERS of each new stream, starting from the captured stream, rather than once for a stream ID the replaying client may never open.
pub fn first_stream_id(&self) -> Option<StreamId>
pub fn first_stream_id(&self) -> Option<StreamId>
The stream a replayed connection opens first: the one its capture opened first, when the capture shows it.
pub fn stream_window_increment(&self) -> Option<u32>
pub fn stream_window_increment(&self) -> Option<u32>
The window increment a replaying client sends right after each new stream’s HEADERS.
§impl EarlyFrameStreamContext
impl EarlyFrameStreamContext
pub fn can_replay_next_frame(&self, next_stream_id: Option<StreamId>) -> bool
pub fn can_replay_next_frame(&self, next_stream_id: Option<StreamId>) -> bool
Returns whether the next replay frame can be consumed for the current stream state.
Callers that need codec capacity before consuming a replay frame can
use this to avoid waiting on write readiness when there is no frame to
replay. The actual replay still goes through Self::replay_next_frame.
pub fn next_frame_is_settings(&self) -> bool
pub fn next_frame_is_settings(&self) -> bool
Returns whether the next replay frame is a non-ACK SETTINGS frame.
pub fn has_replay_frame(&self) -> bool
pub fn has_replay_frame(&self) -> bool
Returns whether another captured frame remains to be replayed.
pub fn has_replayed_connection_window(&self) -> bool
pub fn has_replayed_connection_window(&self) -> bool
Whether a connection WINDOW_UPDATE was consumed from this replay. Only meaningful while a replay still has pending frames.
pub fn record_priority_frame(&mut self, frame: &Priority)
pub fn record_settings_frame(&mut self, frame: &Settings)
pub fn record_windows_update_frame(&mut self, frame: WindowUpdate)
pub fn freeze_recorder(&mut self) -> Option<EarlyFrameCapture>
pub fn freeze_recorder(&mut self) -> Option<EarlyFrameCapture>
Does nothing in case the ctx is not a recorder.
pub fn replay_next_frame( &mut self, next_stream_id: Option<StreamId>, ) -> Option<EarlyFrame>
Trait Implementations§
§impl Clone for EarlyFrameStreamContext
impl Clone for EarlyFrameStreamContext
§fn clone(&self) -> EarlyFrameStreamContext
fn clone(&self) -> EarlyFrameStreamContext
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 Freeze for EarlyFrameStreamContext
impl RefUnwindSafe for EarlyFrameStreamContext
impl Send for EarlyFrameStreamContext
impl Sync for EarlyFrameStreamContext
impl Unpin for EarlyFrameStreamContext
impl UnsafeUnpin for EarlyFrameStreamContext
impl UnwindSafe for EarlyFrameStreamContext
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