pub struct ObjectStore { /* private fields */ }Implementations§
Source§impl ObjectStore
impl ObjectStore
pub fn new(root: impl Into<PathBuf>) -> Self
pub fn with_options(root: impl Into<PathBuf>, verify_on_read: bool) -> Self
pub fn verify_on_read(&self) -> bool
pub fn ensure_dir(&self) -> Result<()>
pub fn put_typed_bytes(&self, tag: &[u8], bytes: &[u8]) -> Result<Hash>
pub fn get_bytes(&self, hash: Hash) -> Result<Vec<u8>>
pub fn get_typed_bytes(&self, tag: &[u8], hash: Hash) -> Result<Vec<u8>>
pub fn exists(&self, hash: Hash) -> bool
pub fn put_serialized<T: Serialize>( &self, tag: &[u8], value: &T, ) -> Result<Hash>
pub fn get_deserialized<T: DeserializeOwned>(&self, hash: Hash) -> Result<T>
pub fn get_deserialized_typed<T: DeserializeOwned>( &self, tag: &[u8], hash: Hash, ) -> Result<T>
Trait Implementations§
Source§impl Clone for ObjectStore
impl Clone for ObjectStore
Source§fn clone(&self) -> ObjectStore
fn clone(&self) -> ObjectStore
Returns a duplicate of the value. Read more
1.0.0 · 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 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