Trait WriteStore

Source
pub trait WriteStore: ReadStore {
    // 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) { ... }
}

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.

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§