pub trait DurabilityProvider<V>: Send + Debugwhere
V: Identities,{
// Required methods
fn domains(&self) -> Vec<FlushDomain>;
fn make_durable(&mut self, request: FlushRequest<V>);
}Expand description
A consumer-supplied durability provider. It makes writes the instance has seen complete durable, by any means, and answers per flush domain. An instance holds at most one; several are composed by a router that is itself a provider. Every other domain, and every file declared with none, is the built-in default’s.
Required Methods§
Sourcefn domains(&self) -> Vec<FlushDomain>
fn domains(&self) -> Vec<FlushDomain>
The flush domains this provider serves, read once when the instance is built.
Sourcefn make_durable(&mut self, request: FlushRequest<V>)
fn make_durable(&mut self, request: FlushRequest<V>)
Make the named writes durable. Returns promptly; the work may finish later, on any thread, through each domain’s completion – inside this call included. Holds no reference to the instance.
dioring calls it from the consumer’s own calls on the instance – normally the pop that
follows the completion letting a seal start – and never with its lock held, so an answer
given inside it is recorded at once (DI-D-44). A panic propagates to that call, and every
completion it drops unanswered is a failure of its domain.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".