Trait ReplayStore
pub trait ReplayStore:
Send
+ Sync
+ 'static {
// Required methods
fn max_bytes(&self) -> u64;
fn timeout(&self) -> Duration;
fn start(&self) -> Box<dyn ReplayWriter>;
// Provided method
fn reuse_buffered_bytes(&self) -> bool { ... }
}http and std only.Expand description
Creates independent writers for uploads selected by a retry policy.
Limits apply to the replay copy. When capture exceeds a limit the original
request can continue to stream. The byte limit counts HTTP data bytes.
Trailer fields are retained separately. The per-request start method must
avoid blocking the executor. Acquire asynchronous resources in the writer.
Required Methods§
fn max_bytes(&self) -> u64
fn max_bytes(&self) -> u64
Inclusive per-request data limit. Exactly this many bytes plus trailers can still form a complete replay.
fn timeout(&self) -> Duration
fn timeout(&self) -> Duration
Maximum duration of capture, measured from the start of the first attempt.
fn start(&self) -> Box<dyn ReplayWriter>
fn start(&self) -> Box<dyn ReplayWriter>
Begin a new, empty capture.
Provided Methods§
fn reuse_buffered_bytes(&self) -> bool
fn reuse_buffered_bytes(&self) -> bool
Allow an already buffered, trailerless body to be replayed directly from its shared bytes, bypassing the writer. The layer still enforces its capture limits. Leave this disabled if the store needs to observe or account for these uploads.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".