Trait Recorder
pub trait Recorder:
Send
+ Sync
+ 'static {
// Required methods
fn record(
&self,
entry: Log,
) -> impl Future<Output = Option<Extensions>> + Send;
fn stop_record(&self) -> impl Future<Output = ()> + Send;
}Available on crate features
http and std only.Required Methods§
fn record(&self, entry: Log) -> impl Future<Output = Option<Extensions>> + Send
fn record(&self, entry: Log) -> impl Future<Output = Option<Extensions>> + Send
Record an already materialized HAR log.
Prefer StreamingRecorder::start_http_recording for live HTTP traffic
so body data can remain streaming.
fn stop_record(&self) -> impl Future<Output = ()> + Send
fn stop_record(&self) -> impl Future<Output = ()> + Send
Finish the active recording before this future resolves.
This function can be called when no session is active, which a recorder must handle as a no-op.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".