Struct ExchangeCapture
pub struct ExchangeCapture { /* private fields */ }http and inspect and std only.Expand description
Pins an exchange, its observations and storage while an adapter or reader uses it.
Implementations§
§impl ExchangeCapture
impl ExchangeCapture
pub fn summary_details(&self) -> CaptureDetails
pub fn summary_details(&self) -> CaptureDetails
Snapshot summary and observations without reading stored metadata records.
pub async fn inspector_details(
&self,
) -> Result<CaptureDetails, Box<dyn Error + Send + Sync>>
pub async fn inspector_details( &self, ) -> Result<CaptureDetails, Box<dyn Error + Send + Sync>>
Read bounded HTTP metadata without body or interception payload bytes.
Upgraded message history is paged separately with message_interceptions.
pub async fn details( &self, ) -> Result<CaptureDetails, Box<dyn Error + Send + Sync>>
pub fn id(&self) -> u64
pub fn metadata(&self) -> &CaptureMetadata
pub fn inspection_state(&self) -> InspectionState
pub fn snapshot(&self) -> HttpExchangeSummary
pub fn state<T>(&self) -> Arc<T> ⓘ
pub fn changed(&self)
pub fn set_active(&self)
pub fn mark_truncated(&self)
pub fn record_bytes(&self, direction: CapturedBody, length: u64)
pub fn reserve_body(&self, direction: CapturedBody, length: u64) -> bool
pub fn count<T>(&self) -> usizewhere
T: CapturedRecord,
pub async fn append<T>(
&self,
record: &T,
) -> Result<bool, Box<dyn Error + Send + Sync>>where
T: CapturedRecord,
pub async fn record_stream<T>(
&self,
index: usize,
) -> Result<Option<CapturedRecordStream<<T as CapturedRecord>::Metadata>>, Box<dyn Error + Send + Sync>>where
T: CapturedRecord,
pub async fn record_stream<T>(
&self,
index: usize,
) -> Result<Option<CapturedRecordStream<<T as CapturedRecord>::Metadata>>, Box<dyn Error + Send + Sync>>where
T: CapturedRecord,
Read typed metadata and stream the payload without materializing it.
pub async fn record<T>(
&self,
index: usize,
) -> Result<Option<T>, Box<dyn Error + Send + Sync>>where
T: CapturedRecord,
pub async fn record<T>(
&self,
index: usize,
) -> Result<Option<T>, Box<dyn Error + Send + Sync>>where
T: CapturedRecord,
Explicitly read one owned record. Prefer record_stream for large payloads.
pub async fn records<T>(
&self,
range: Range<usize>,
) -> Result<Vec<T>, Box<dyn Error + Send + Sync>>where
T: CapturedRecord,
§impl ExchangeCapture
impl ExchangeCapture
pub async fn message_interceptions(
&self,
page: usize,
) -> Result<Vec<StoredRecord>, Box<dyn Error + Send + Sync>>
pub async fn message_interceptions( &self, page: usize, ) -> Result<Vec<StoredRecord>, Box<dyn Error + Send + Sync>>
Read a page of upgraded-message decisions, newest page first. Each payload
preview is bounded to 1 KiB and each page to 16 records. Full records remain
available through explicit capture downloads or details.
§impl ExchangeCapture
impl ExchangeCapture
pub fn body_source(&self, body: CapturedBody) -> CapturedBodySource
§impl ExchangeCapture
impl ExchangeCapture
pub async fn request_head(
&self,
) -> Result<Option<StoredRecord>, Box<dyn Error + Send + Sync>>
pub async fn request_head( &self, ) -> Result<Option<StoredRecord>, Box<dyn Error + Send + Sync>>
Read only the original request head; body and subsequent decision records are untouched.
pub fn records_stream(
&self,
) -> impl Stream<Item = Result<StoredRecord, Box<dyn Error + Send + Sync>>> + Send + 'static + use<>
pub fn records_stream( &self, ) -> impl Stream<Item = Result<StoredRecord, Box<dyn Error + Send + Sync>>> + Send + 'static + use<>
Stream a pinned record prefix. Body records may be split into smaller chunks; metadata ordering and the concatenated body bytes are preserved.
Trait Implementations§
§impl Clone for ExchangeCapture
impl Clone for ExchangeCapture
§fn clone(&self) -> ExchangeCapture
fn clone(&self) -> ExchangeCapture
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 !RefUnwindSafe for ExchangeCapture
impl !UnwindSafe for ExchangeCapture
impl Freeze for ExchangeCapture
impl Send for ExchangeCapture
impl Sync for ExchangeCapture
impl Unpin for ExchangeCapture
impl UnsafeUnpin for ExchangeCapture
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