Trait Repo

Source
pub trait Repo {
    // Required methods
    fn base_repo(&self) -> &ReadonlyRepo;
    fn store(&self) -> &Arc<Store>;
    fn op_store(&self) -> &Arc<dyn OpStore>;
    fn index(&self) -> &dyn Index;
    fn view(&self) -> &View;
    fn submodule_store(&self) -> &Arc<dyn SubmoduleStore>;
    fn resolve_change_id_prefix(
        &self,
        prefix: &HexPrefix,
    ) -> PrefixResolution<Vec<CommitId>>;
    fn shortest_unique_change_id_prefix_len(
        &self,
        target_id_bytes: &ChangeId,
    ) -> usize;

    // Provided method
    fn resolve_change_id(&self, change_id: &ChangeId) -> Option<Vec<CommitId>> { ... }
}

Required Methods§

Source

fn base_repo(&self) -> &ReadonlyRepo

Base repository that contains all committed data. Returns self if this is a ReadonlyRepo,

Source

fn store(&self) -> &Arc<Store>

Source

fn op_store(&self) -> &Arc<dyn OpStore>

Source

fn index(&self) -> &dyn Index

Source

fn view(&self) -> &View

Source

fn submodule_store(&self) -> &Arc<dyn SubmoduleStore>

Source

fn resolve_change_id_prefix( &self, prefix: &HexPrefix, ) -> PrefixResolution<Vec<CommitId>>

Source

fn shortest_unique_change_id_prefix_len( &self, target_id_bytes: &ChangeId, ) -> usize

Provided Methods§

Source

fn resolve_change_id(&self, change_id: &ChangeId) -> Option<Vec<CommitId>>

Implementors§