pub trait EvidenceSink: Send + Sync {
// Required method
fn deliver<'a>(
&'a self,
record: &'a RunRecord,
) -> BoxFuture<'a, Result<String, String>>;
// Provided methods
fn accepts(&self, schema: &str) -> bool { ... }
fn run_schema(&self) -> &'static str { ... }
}Expand description
Receives run records (spec 003, 3.9). A receipt establishes that the sink accepted the record for its decision id under the sink’s own durability terms, nothing more.
Required Methods§
Provided Methods§
Sourcefn accepts(&self, schema: &str) -> bool
fn accepts(&self, schema: &str) -> bool
Whether the sink accepts run records of schema (spec 032, 3.11.2).
A sink accepts only rustev.run/1 unless it says otherwise.
Sourcefn run_schema(&self) -> &'static str
fn run_schema(&self) -> &'static str
The one run-record schema the sink selected at construction for a
plan 2 decision (spec 020, 2 and 3.2): rustev.run/1, the default,
or rustev.run/2. A sink that selects version 2 is never given
version 1 bytes in its place, and a rejected version 2 record is
never retried as version 1.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".