pub trait ExchangeSink: Send + Sync {
// Required method
fn deliver(
&self,
record: &ExchangeRecord,
retained: Option<&RetainedBytes>,
) -> Result<(), String>;
// Provided methods
fn offer(&self, offer: &ReconciliationOffer) -> Result<(), String> { ... }
fn deliver_located(
&self,
record: &ExchangeRecord,
retained: Option<&RetainedBytes>,
) -> Result<Option<String>, String> { ... }
}Expand description
The host’s exchange sink.
Required Methods§
Sourcefn deliver(
&self,
record: &ExchangeRecord,
retained: Option<&RetainedBytes>,
) -> Result<(), String>
fn deliver( &self, record: &ExchangeRecord, retained: Option<&RetainedBytes>, ) -> Result<(), String>
Receive one record, and its bytes when retention is on.
Provided Methods§
Sourcefn offer(&self, offer: &ReconciliationOffer) -> Result<(), String>
fn offer(&self, offer: &ReconciliationOffer) -> Result<(), String>
Receive a reconciliation offer. The default discards it.
Sourcefn deliver_located(
&self,
record: &ExchangeRecord,
retained: Option<&RetainedBytes>,
) -> Result<Option<String>, String>
fn deliver_located( &self, record: &ExchangeRecord, retained: Option<&RetainedBytes>, ) -> Result<Option<String>, String>
Self::deliver, naming where the host keeps the record: an opaque
locator a rustev.run/2 record may reference (spec 020, 3.2), never
a URL with credentials. The default delivers and names none.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".