Skip to main content

HintStore

Trait HintStore 

Source
pub trait HintStore {
    // Required methods
    fn store(
        &mut self,
        hint: Hint,
        required_by_consistency: bool,
        now_millis: u64,
    ) -> Result<HintOutcome, HintError>;
    fn drain_for(
        &mut self,
        target: &ClusterNodeId,
    ) -> Result<Vec<Hint>, HintError>;
}
Expand description

Bounded hint storage contract.

Required Methods§

Source

fn store( &mut self, hint: Hint, required_by_consistency: bool, now_millis: u64, ) -> Result<HintOutcome, HintError>

Store one hint unless the required-ack path forbids doing so.

Source

fn drain_for(&mut self, target: &ClusterNodeId) -> Result<Vec<Hint>, HintError>

Drain all retained hints for one target in insertion order.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§