pub trait FrameInspector: Send + Sync {
// Required methods
fn inspect_client_frame<'life0, 'life1, 'async_trait>(
&'life0 self,
frame: &'life1 WebSocketFrame,
) -> Pin<Box<dyn Future<Output = InspectionResult> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn inspect_server_frame<'life0, 'life1, 'async_trait>(
&'life0 self,
frame: &'life1 WebSocketFrame,
) -> Pin<Box<dyn Future<Output = InspectionResult> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn correlation_id(&self) -> &str;
}Expand description
Trait for WebSocket frame inspection.
This trait abstracts the frame inspection logic, allowing for easy testing with mock implementations.
Required Methods§
Sourcefn inspect_client_frame<'life0, 'life1, 'async_trait>(
&'life0 self,
frame: &'life1 WebSocketFrame,
) -> Pin<Box<dyn Future<Output = InspectionResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn inspect_client_frame<'life0, 'life1, 'async_trait>(
&'life0 self,
frame: &'life1 WebSocketFrame,
) -> Pin<Box<dyn Future<Output = InspectionResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Inspect a frame from client to server
Sourcefn inspect_server_frame<'life0, 'life1, 'async_trait>(
&'life0 self,
frame: &'life1 WebSocketFrame,
) -> Pin<Box<dyn Future<Output = InspectionResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn inspect_server_frame<'life0, 'life1, 'async_trait>(
&'life0 self,
frame: &'life1 WebSocketFrame,
) -> Pin<Box<dyn Future<Output = InspectionResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Inspect a frame from server to client
Sourcefn correlation_id(&self) -> &str
fn correlation_id(&self) -> &str
Get the correlation ID for logging
Implementors§
impl FrameInspector for WebSocketInspector
Implementation of FrameInspector that delegates to WebSocketInspector