pub struct ObjectStore { /* private fields */ }Expand description
Object storage - handles reading/writing objects to disk with optional encryption
Implementations§
Source§impl ObjectStore
impl ObjectStore
Sourcepub fn new_with_encryption(
repo_path: &Path,
passphrase: Option<&str>,
) -> Result<Self, String>
pub fn new_with_encryption( repo_path: &Path, passphrase: Option<&str>, ) -> Result<Self, String>
Create object store with encryption passphrase
Sourcepub fn exists(&self, hash: &ObjectHash) -> bool
pub fn exists(&self, hash: &ObjectHash) -> bool
Check if an object exists
Sourcepub fn encryption(&self) -> Arc<Mutex<EncryptionManager>> ⓘ
pub fn encryption(&self) -> Arc<Mutex<EncryptionManager>> ⓘ
The encryption manager this store reads and writes through.
gc needs it so that packed objects get exactly the treatment the loose
ones had, rather than landing on disk in the clear.
Auto Trait Implementations§
impl Freeze for ObjectStore
impl RefUnwindSafe for ObjectStore
impl Send for ObjectStore
impl Sync for ObjectStore
impl Unpin for ObjectStore
impl UnsafeUnpin for ObjectStore
impl UnwindSafe for ObjectStore
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more