Trait grid_sdk::commits::store::CommitStore[][src]

pub trait CommitStore: Send + Sync {
    fn add_commit(&self, commit: Commit) -> Result<(), CommitStoreError>;
fn get_commit_by_commit_num(
        &self,
        commit_num: i64
    ) -> Result<Option<Commit>, CommitStoreError>;
fn get_current_commit_id(&self) -> Result<Option<String>, CommitStoreError>;
fn get_next_commit_num(&self) -> Result<i64, CommitStoreError>;
fn resolve_fork(&self, commit_num: i64) -> Result<(), CommitStoreError>;
fn create_db_commit_from_commit_event(
        &self,
        event: &CommitEvent
    ) -> Result<Option<Commit>, CommitEventError>; }

Required methods

Adds an commit to the underlying storage

Arguments

  • commit - The commit to be added

Gets a commit from the underlying storage

Arguments

  • commit_num - The commit to be fetched

Gets the current commit ID from the underlying storage

Arguments

Gets the next commit number from the underlying storage

Arguments

Resolves a fork

Arguments

  • commit_num - The commit to be fetched

Creates a commit model from a commit event

Arguments

  • event - The commit event to be processed

Implementations on Foreign Types

Implementors