Struct jujutsu_lib::store::Store
source · [−]pub struct Store { /* private fields */ }Expand description
Wraps the low-level backend and makes it return more convenient types. Also adds the root commit and adds caching.
Implementations
sourceimpl Store
impl Store
pub fn init_local(store_path: PathBuf) -> Arc<Self>
pub fn init_internal_git(store_path: PathBuf) -> Arc<Self>
pub fn init_external_git(
store_path: PathBuf,
git_repo_path: PathBuf
) -> Arc<Self>
pub fn load_store(store_path: PathBuf) -> Arc<Store>
pub fn hash_length(&self) -> usize
pub fn git_repo(&self) -> Option<Repository>
pub fn empty_tree_id(&self) -> &TreeId
pub fn root_commit_id(&self) -> &CommitId
pub fn root_commit(self: &Arc<Self>) -> Commit
pub fn get_commit(self: &Arc<Self>, id: &CommitId) -> BackendResult<Commit>
pub fn write_commit(self: &Arc<Self>, commit: Commit) -> Commit
pub fn get_tree(
self: &Arc<Self>,
dir: &RepoPath,
id: &TreeId
) -> BackendResult<Tree>
pub fn write_tree(
&self,
path: &RepoPath,
contents: &Tree
) -> BackendResult<TreeId>
pub fn read_file(
&self,
path: &RepoPath,
id: &FileId
) -> BackendResult<Box<dyn Read>>
pub fn write_file(
&self,
path: &RepoPath,
contents: &mut dyn Read
) -> BackendResult<FileId>
pub fn read_symlink(
&self,
path: &RepoPath,
id: &SymlinkId
) -> BackendResult<String>
pub fn write_symlink(
&self,
path: &RepoPath,
contents: &str
) -> BackendResult<SymlinkId>
pub fn read_conflict(&self, id: &ConflictId) -> BackendResult<Conflict>
pub fn write_conflict(&self, contents: &Conflict) -> BackendResult<ConflictId>
pub fn tree_builder(self: &Arc<Self>, base_tree_id: TreeId) -> TreeBuilder
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Store
impl Send for Store
impl Sync for Store
impl Unpin for Store
impl !UnwindSafe for Store
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more