Skip to main content

CaptureWebSocketExt

Trait CaptureWebSocketExt 

pub trait CaptureWebSocketExt {
    // Required methods
    fn record_websocket_message(
        &self,
        id: u64,
        message: CapturedWebSocketMessage,
    ) -> impl Future<Output = ()> + Send;
    fn register_websocket_injector(
        &self,
        id: u64,
        injector: WebSocketRelayInjector,
    );
    fn websocket_details(
        &self,
        id: u64,
        page: usize,
        page_size: usize,
    ) -> impl Future<Output = Result<WebSocketDetails, Box<dyn Error + Send + Sync>>> + Send;
    fn replay_websocket_message(
        &self,
        id: u64,
        index: usize,
    ) -> impl Future<Output = Result<(), WebSocketReplayError>> + Send;
    fn send_websocket_message(
        &self,
        id: u64,
        direction: WebSocketRelayDirection,
        message: WebSocketRelayMessage,
    ) -> impl Future<Output = Result<(), WebSocketReplayError>> + Send;
    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>>;
}
Available on crate features http and inspect and std and ws only.

Required Methods§

fn record_websocket_message( &self, id: u64, message: CapturedWebSocketMessage, ) -> impl Future<Output = ()> + Send

fn register_websocket_injector(&self, id: u64, injector: WebSocketRelayInjector)

fn websocket_details( &self, id: u64, page: usize, page_size: usize, ) -> impl Future<Output = Result<WebSocketDetails, Box<dyn Error + Send + Sync>>> + Send

fn replay_websocket_message( &self, id: u64, index: usize, ) -> impl Future<Output = Result<(), WebSocketReplayError>> + Send

fn send_websocket_message( &self, id: u64, direction: WebSocketRelayDirection, message: WebSocketRelayMessage, ) -> impl Future<Output = Result<(), WebSocketReplayError>> + Send

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>>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§