pub struct EmbeddedStore { /* private fields */ }Expand description
A content-addressed directory store.
Implementations§
Source§impl EmbeddedStore
impl EmbeddedStore
Sourcepub fn open(root: impl AsRef<Path>) -> Result<Self>
pub fn open(root: impl AsRef<Path>) -> Result<Self>
Open (creating if necessary) a store rooted at root.
Creates the directory tree, writes/validates the STORE marker, and
sweeps any leftover .tmp-* files from a crashed put.
Sourcepub fn len(&self, id: &Id) -> Result<u64>
pub fn len(&self, id: &Id) -> Result<u64>
The raw stored length of id, or a typed error if absent.
Sourcepub fn stats(&self) -> Result<StoreStats>
pub fn stats(&self) -> Result<StoreStats>
Store statistics over every present object.
Trait Implementations§
Source§impl Clone for EmbeddedStore
impl Clone for EmbeddedStore
Source§impl Debug for EmbeddedStore
impl Debug for EmbeddedStore
Source§impl ObjectStore for EmbeddedStore
impl ObjectStore for EmbeddedStore
Source§fn put(&mut self, bytes: &[u8]) -> Result<Id>
fn put(&mut self, bytes: &[u8]) -> Result<Id>
Store
bytes, returning its content id. Read moreSource§fn contains(&self, id: &Id) -> Result<bool>
fn contains(&self, id: &Id) -> Result<bool>
Whether
id is present. EmbeddedStore overrides it with a stat.Auto Trait Implementations§
impl Freeze for EmbeddedStore
impl RefUnwindSafe for EmbeddedStore
impl Send for EmbeddedStore
impl Sync for EmbeddedStore
impl Unpin for EmbeddedStore
impl UnsafeUnpin for EmbeddedStore
impl UnwindSafe for EmbeddedStore
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