Struct CaptureStore
pub struct CaptureStore(/* private fields */);http and inspect and std only.Implementations§
§impl CaptureStore
impl CaptureStore
pub fn begin_connection_if_enabled( &self, socket: Option<SocketInfo>, ingress: Protocol, label: Option<String>, ) -> Option<u64>
pub fn connection_guard(&self, id: u64) -> CaptureConnectionGuard
pub fn upgrade_guard(&self, id: u64) -> HttpUpgradeCaptureGuard
pub fn upgrade_guard_for_response( &self, id: u64, status: u16, ) -> Option<HttpUpgradeCaptureGuard>
pub async fn clear(&self)
pub fn confirm_connection(&self, id: u64)
pub fn confirm_connection(&self, id: u64)
Publish a provisionally accepted socket once it is known to carry proxy traffic rather than the inspector’s own shared-port HTTP traffic.
pub fn confirm_connection_if_enabled(&self, id: u64)
pub fn set_connection_protocol(&self, id: u64, protocol: Protocol)
pub fn set_connection_protocol_if_enabled(&self, id: u64, protocol: Protocol)
pub fn finish_connection(&self, id: u64)
pub fn finish_upgrade(&self, id: u64)
pub fn discard_connection_if_empty(&self, id: u64) -> bool
pub fn discard_connection_if_empty(&self, id: u64) -> bool
Forget a connection that has only served the inspector itself.
A shared proxy/UI listener cannot distinguish the two at accept time. The first parsed origin-form dashboard request can, and is allowed to remove the provisional entry as long as no proxied exchange has been associated with it.
§impl CaptureStore
impl CaptureStore
pub fn exchange_capture( &self, id: u64, ) -> Result<ExchangeCapture, Box<dyn Error + Send + Sync>>
§impl CaptureStore
impl CaptureStore
pub async fn snapshot(&self, filter: &CaptureFilter) -> CaptureSnapshot
pub async fn snapshot_limited( &self, filter: &CaptureFilter, connection_limit: usize, exchange_limit: usize, ) -> CaptureSnapshot
pub async fn snapshot_limited_for_connections( &self, filter: &CaptureFilter, selected_connections: &BTreeSet<u64>, connection_offset: usize, connection_limit: usize, exchange_limit: usize, ) -> CaptureSnapshot
pub async fn snapshot_limited_before_connection( &self, filter: &CaptureFilter, selected_connections: &BTreeSet<u64>, before_connection_id: Option<u64>, connection_limit: usize, exchange_limit: usize, ) -> CaptureSnapshot
§impl CaptureStore
impl CaptureStore
pub async fn details( &self, id: u64, ) -> Result<CaptureDetails, Box<dyn Error + Send + Sync>>
pub async fn inspector_details( &self, id: u64, ) -> Result<CaptureDetails, Box<dyn Error + Send + Sync>>
pub async fn body_stream(
&self,
id: u64,
body: CapturedBody,
limit: Option<u64>,
) -> Result<impl Stream<Item = Result<Bytes, Box<dyn Error + Send + Sync>>> + Send + 'static, Box<dyn Error + Send + Sync>>
pub async fn body_stream( &self, id: u64, body: CapturedBody, limit: Option<u64>, ) -> Result<impl Stream<Item = Result<Bytes, Box<dyn Error + Send + Sync>>> + Send + 'static, Box<dyn Error + Send + Sync>>
Stream logical body bytes directly from storage. A range-limited backend can avoid reading bytes beyond a preview; no JSON or base64 decoding occurs.
pub async fn replay_request( &self, id: u64, ) -> Result<ReplayRequest, Box<dyn Error + Send + Sync>>
§impl CaptureStore
impl CaptureStore
pub async fn record_decision( &self, id: u64, original: &Message, outcome: &str, headers: Option<&HeaderMap>, )
pub async fn record_replay_result( &self, id: u64, result: Result<StatusCode, String>, )
§impl CaptureStore
impl CaptureStore
pub fn with_storage(
storage: BoxService<CreateCollection, Collection, Box<dyn Error + Send + Sync>>,
config: CaptureConfig,
inspection: InspectionState,
) -> CaptureStore
pub fn with_storage( storage: BoxService<CreateCollection, Collection, Box<dyn Error + Send + Sync>>, config: CaptureConfig, inspection: InspectionState, ) -> CaptureStore
Assemble an inspector with caller-selected storage and a shared pause boundary.
pub fn control(&self) -> Control
pub fn new_control_connection(&self) -> ControlConnection
pub fn begin_observed_connection( &self, id: u64, socket: Option<SocketInfo>, ingress: Protocol, ) -> Option<u64>
pub fn inspection_state(&self) -> InspectionState
pub fn subscribe(
&self,
query: CaptureQuery,
) -> impl Stream<Item = CaptureSnapshot> + Send + 'static
pub fn subscribe( &self, query: CaptureQuery, ) -> impl Stream<Item = CaptureSnapshot> + Send + 'static
Subscribe directly to initial and updated capture content. Body bytes remain
independently streamable through body_stream, so lists stay lightweight.
pub fn subscribe_changes(&self) -> Receiver<u64>
pub fn connection_display_id(&self, id: u64) -> Option<u64>
pub fn connection_summary(&self, id: u64) -> Option<HttpConnectionSummary>
pub fn selected_exchange_ids( &self, request_ids: &BTreeSet<u64>, connection_ids: &BTreeSet<u64>, ) -> BTreeSet<u64>
pub fn selected_exchanges( &self, request_ids: &BTreeSet<u64>, connection_ids: &BTreeSet<u64>, ) -> CaptureSelection
Trait Implementations§
§impl CaptureWebSocketExt for CaptureStore
impl CaptureWebSocketExt for CaptureStore
async fn record_websocket_message( &self, id: u64, message: CapturedWebSocketMessage, )
fn register_websocket_injector(&self, id: u64, injector: WebSocketRelayInjector)
async fn websocket_details( &self, id: u64, page: usize, page_size: usize, ) -> Result<WebSocketDetails, Box<dyn Error + Send + Sync>>
async fn replay_websocket_message( &self, id: u64, index: usize, ) -> Result<(), WebSocketReplayError>
async fn send_websocket_message( &self, id: u64, direction: WebSocketRelayDirection, message: WebSocketRelayMessage, ) -> Result<(), WebSocketReplayError>
fn websocket_message_stream( &self, id: u64, index: usize, ) -> Result<impl Stream<Item = Result<Bytes, Box<dyn Error + Send + Sync>>> + Send + 'static, Box<dyn Error + Send + Sync>>
§impl Clone for CaptureStore
impl Clone for CaptureStore
§fn clone(&self) -> CaptureStore
fn clone(&self) -> CaptureStore
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for CaptureStore
impl Debug for CaptureStore
§impl Service<CaptureQuery> for CaptureStore
impl Service<CaptureQuery> for CaptureStore
§type Output = CaptureSnapshot
type Output = CaptureSnapshot
§async fn serve(
&self,
query: CaptureQuery,
) -> Result<<CaptureStore as Service<CaptureQuery>>::Output, <CaptureStore as Service<CaptureQuery>>::Error>
async fn serve( &self, query: CaptureQuery, ) -> Result<<CaptureStore as Service<CaptureQuery>>::Output, <CaptureStore as Service<CaptureQuery>>::Error>
§fn boxed(self) -> BoxService<Input, Self::Output, Self::Error>
fn boxed(self) -> BoxService<Input, Self::Output, Self::Error>
Auto Trait Implementations§
impl !RefUnwindSafe for CaptureStore
impl !UnwindSafe for CaptureStore
impl Freeze for CaptureStore
impl Send for CaptureStore
impl Sync for CaptureStore
impl Unpin for CaptureStore
impl UnsafeUnpin for CaptureStore
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