Skip to main content

StreamingRecorder

Trait StreamingRecorder 

pub trait StreamingRecorder: Recorder {
    type Session: RecorderSession;

    // Required method
    fn start_http_recording(
        &self,
        request: HttpRequestCapture,
    ) -> impl Future<Output = Option<Self::Session>> + Send;
}
Available on crate features http and std only.
Expand description

Recorder capable of consuming live HTTP bodies without materializing them.

Required Associated Types§

type Session: RecorderSession

Per-exchange recording handle.

Required Methods§

fn start_http_recording( &self, request: HttpRequestCapture, ) -> impl Future<Output = Option<Self::Session>> + Send

Start capturing an HTTP exchange.

This future must resolve after the recorder has accepted ownership of the request stream. Body data continues to flow after it returns.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§

§

impl StreamingRecorder for FileRecorder

§

type Session = FileRecorderSession

§

impl<R> StreamingRecorder for Arc<R>