Trait jujutsu_lib::store::Store[][src]

pub trait Store: Send + Sync + Debug {
Show methods fn hash_length(&self) -> usize;
fn git_repo(&self) -> Option<Repository>;
fn read_file(
        &self,
        path: &FileRepoPath,
        id: &FileId
    ) -> StoreResult<Box<dyn Read>>;
fn write_file(
        &self,
        path: &FileRepoPath,
        contents: &mut dyn Read
    ) -> StoreResult<FileId>;
fn read_symlink(
        &self,
        path: &FileRepoPath,
        id: &SymlinkId
    ) -> StoreResult<String>;
fn write_symlink(
        &self,
        path: &FileRepoPath,
        target: &str
    ) -> StoreResult<SymlinkId>;
fn empty_tree_id(&self) -> &TreeId;
fn read_tree(&self, path: &DirRepoPath, id: &TreeId) -> StoreResult<Tree>;
fn write_tree(
        &self,
        path: &DirRepoPath,
        contents: &Tree
    ) -> StoreResult<TreeId>;
fn read_commit(&self, id: &CommitId) -> StoreResult<Commit>;
fn write_commit(&self, contents: &Commit) -> StoreResult<CommitId>;
fn read_conflict(&self, id: &ConflictId) -> StoreResult<Conflict>;
fn write_conflict(&self, contents: &Conflict) -> StoreResult<ConflictId>;
}

Required methods

fn hash_length(&self) -> usize[src]

fn git_repo(&self) -> Option<Repository>[src]

fn read_file(
    &self,
    path: &FileRepoPath,
    id: &FileId
) -> StoreResult<Box<dyn Read>>
[src]

fn write_file(
    &self,
    path: &FileRepoPath,
    contents: &mut dyn Read
) -> StoreResult<FileId>
[src]

fn empty_tree_id(&self) -> &TreeId[src]

fn read_tree(&self, path: &DirRepoPath, id: &TreeId) -> StoreResult<Tree>[src]

fn write_tree(&self, path: &DirRepoPath, contents: &Tree) -> StoreResult<TreeId>[src]

fn read_commit(&self, id: &CommitId) -> StoreResult<Commit>[src]

fn write_commit(&self, contents: &Commit) -> StoreResult<CommitId>[src]

fn read_conflict(&self, id: &ConflictId) -> StoreResult<Conflict>[src]

fn write_conflict(&self, contents: &Conflict) -> StoreResult<ConflictId>[src]

Loading content...

Implementors

impl Store for GitStore[src]

fn hash_length(&self) -> usize[src]

fn git_repo(&self) -> Option<Repository>[src]

fn read_file(
    &self,
    _path: &FileRepoPath,
    id: &FileId
) -> StoreResult<Box<dyn Read>>
[src]

fn write_file(
    &self,
    _path: &FileRepoPath,
    contents: &mut dyn Read
) -> StoreResult<FileId>
[src]

fn empty_tree_id(&self) -> &TreeId[src]

fn read_tree(&self, _path: &DirRepoPath, id: &TreeId) -> StoreResult<Tree>[src]

fn write_tree(
    &self,
    _path: &DirRepoPath,
    contents: &Tree
) -> StoreResult<TreeId>
[src]

fn read_commit(&self, id: &CommitId) -> StoreResult<Commit>[src]

fn write_commit(&self, contents: &Commit) -> StoreResult<CommitId>[src]

fn read_conflict(&self, id: &ConflictId) -> StoreResult<Conflict>[src]

fn write_conflict(&self, conflict: &Conflict) -> StoreResult<ConflictId>[src]

impl Store for LocalStore[src]

fn hash_length(&self) -> usize[src]

fn git_repo(&self) -> Option<Repository>[src]

fn read_file(
    &self,
    _path: &FileRepoPath,
    id: &FileId
) -> StoreResult<Box<dyn Read>>
[src]

fn write_file(
    &self,
    _path: &FileRepoPath,
    contents: &mut dyn Read
) -> StoreResult<FileId>
[src]

fn empty_tree_id(&self) -> &TreeId[src]

fn read_tree(&self, _path: &DirRepoPath, id: &TreeId) -> StoreResult<Tree>[src]

fn write_tree(&self, _path: &DirRepoPath, tree: &Tree) -> StoreResult<TreeId>[src]

fn read_commit(&self, id: &CommitId) -> StoreResult<Commit>[src]

fn write_commit(&self, commit: &Commit) -> StoreResult<CommitId>[src]

fn read_conflict(&self, id: &ConflictId) -> StoreResult<Conflict>[src]

fn write_conflict(&self, conflict: &Conflict) -> StoreResult<ConflictId>[src]

Loading content...