Trait CapturedRecord
pub trait CapturedRecord:
Sized
+ Send
+ Sync
+ 'static {
type Metadata: Serialize + DeserializeOwned + Send + Sync;
// Required methods
fn metadata(&self) -> Self::Metadata;
fn payload(&self) -> Bytes;
fn from_parts(metadata: Self::Metadata, payload: Bytes) -> Self;
fn matches_stream(
record: CapturedRecordStream<Self::Metadata>,
needle: &str,
) -> impl Future<Output = Result<bool, Box<dyn Error + Send + Sync>>> + Send;
}Available on crate features
http and inspect and std only.Expand description
An adapter-owned record. Metadata must fit in 64 KiB; payloads stay raw and
stream separately. Implementations should return an existing Bytes handle
from payload, without allocating another payload buffer.
Required Associated Types§
type Metadata: Serialize + DeserializeOwned + Send + Sync
Required Methods§
fn metadata(&self) -> Self::Metadata
fn payload(&self) -> Bytes
fn from_parts(metadata: Self::Metadata, payload: Bytes) -> Self
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".