pub struct LocalObjectStore { /* private fields */ }Expand description
Filesystem-backed content-addressed object store.
Implementations§
Source§impl LocalObjectStore
impl LocalObjectStore
Sourcepub fn open(root: impl Into<PathBuf>) -> ImageResult<Self>
pub fn open(root: impl Into<PathBuf>) -> ImageResult<Self>
Open or create a local object store rooted at root.
Sourcepub fn put_bytes(&self, bytes: &[u8]) -> ImageResult<ObjectId>
pub fn put_bytes(&self, bytes: &[u8]) -> ImageResult<ObjectId>
Store exact bytes durably and return their immutable identity.
Sourcepub fn object_path(&self, id: &ObjectId) -> PathBuf
pub fn object_path(&self, id: &ObjectId) -> PathBuf
Return the confined path of a stored object.
Trait Implementations§
Source§impl Clone for LocalObjectStore
impl Clone for LocalObjectStore
Source§fn clone(&self) -> LocalObjectStore
fn clone(&self) -> LocalObjectStore
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for LocalObjectStore
impl RefUnwindSafe for LocalObjectStore
impl Send for LocalObjectStore
impl Sync for LocalObjectStore
impl Unpin for LocalObjectStore
impl UnsafeUnpin for LocalObjectStore
impl UnwindSafe for LocalObjectStore
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