Skip to main content

WriteStore

Trait WriteStore 

Source
pub trait WriteStore: ReadStore {
Show 14 methods // Required methods fn try_insert_checkpoint( &self, checkpoint: &VerifiedCheckpoint, ) -> Result<()>; fn try_update_highest_synced_checkpoint( &self, checkpoint: &VerifiedCheckpoint, ) -> Result<()>; fn try_update_highest_verified_checkpoint( &self, checkpoint: &VerifiedCheckpoint, ) -> Result<()>; fn try_insert_checkpoint_contents( &self, checkpoint: &VerifiedCheckpoint, contents: VerifiedCheckpointContents, ) -> Result<()>; fn try_insert_committee(&self, new_committee: Committee) -> Result<()>; // Provided methods fn insert_checkpoint(&self, checkpoint: &VerifiedCheckpoint) { ... } fn update_highest_synced_checkpoint(&self, checkpoint: &VerifiedCheckpoint) { ... } fn update_highest_verified_checkpoint( &self, checkpoint: &VerifiedCheckpoint, ) { ... } fn insert_checkpoint_contents( &self, checkpoint: &VerifiedCheckpoint, contents: VerifiedCheckpointContents, ) { ... } fn insert_committee(&self, new_committee: Committee) { ... } fn try_get_highest_executed_checkpoint_seq_number( &self, ) -> Result<Option<CheckpointSequenceNumber>> { ... } fn get_highest_executed_checkpoint_seq_number( &self, ) -> Option<CheckpointSequenceNumber> { ... } fn wait_for_executed_checkpoint( &self, _sequence_number: CheckpointSequenceNumber, ) -> impl Future<Output = ()> + Send { ... } fn try_insert_synced_checkpoints( &self, checkpoints: Vec<(VerifiedCheckpoint, VerifiedCheckpointContents)>, ) -> Result<()> { ... }
}

Required Methods§

Provided Methods§

Source

fn insert_checkpoint(&self, checkpoint: &VerifiedCheckpoint)

Non-fallible version of try_insert_checkpoint.

Source

fn update_highest_synced_checkpoint(&self, checkpoint: &VerifiedCheckpoint)

Non-fallible version of try_update_highest_synced_checkpoint.

Source

fn update_highest_verified_checkpoint(&self, checkpoint: &VerifiedCheckpoint)

Non-fallible version of try_update_highest_verified_checkpoint.

Source

fn insert_checkpoint_contents( &self, checkpoint: &VerifiedCheckpoint, contents: VerifiedCheckpointContents, )

Non-fallible version of try_insert_checkpoint_contents.

Source

fn insert_committee(&self, new_committee: Committee)

Non-fallible version of try_insert_committee.

Source

fn try_get_highest_executed_checkpoint_seq_number( &self, ) -> Result<Option<CheckpointSequenceNumber>>

The highest checkpoint whose transactions have been executed, when the store tracks execution progress. None when nothing has been executed yet or the store does not track execution (the default).

Source

fn get_highest_executed_checkpoint_seq_number( &self, ) -> Option<CheckpointSequenceNumber>

Non-fallible version of try_get_highest_executed_checkpoint_seq_number.

Source

fn wait_for_executed_checkpoint( &self, _sequence_number: CheckpointSequenceNumber, ) -> impl Future<Output = ()> + Send

Resolves once the store’s executed watermark has reached the given sequence number. Returns right away for stores that don’t track execution (the default), since their watermark never advances.

Source

fn try_insert_synced_checkpoints( &self, checkpoints: Vec<(VerifiedCheckpoint, VerifiedCheckpointContents)>, ) -> Result<()>

Inserts a consecutive run of verified checkpoints with their full contents and advances the verified and synced watermarks past the last one.

The default implementation inserts the checkpoints one at a time; implementations can override it to batch the writes.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<T: WriteStore + ?Sized> WriteStore for &T

Source§

impl<T: WriteStore + ?Sized> WriteStore for Box<T>

Source§

impl<T: WriteStore + ?Sized> WriteStore for Arc<T>

Implementors§