pub struct Store { /* private fields */ }Implementations§
Source§impl Store
impl Store
pub fn new(root: PathBuf) -> Self
pub fn ensure(&self) -> Result<()>
Sourcepub fn put_bytes(&self, data: &[u8]) -> Result<String>
pub fn put_bytes(&self, data: &[u8]) -> Result<String>
Store raw bytes, returning their content hash. Writing is race-free: a
concurrent writer of the same content simply loses the create_new and
we treat that as success (the bytes are identical by construction).
Auto Trait Implementations§
impl Freeze for Store
impl RefUnwindSafe for Store
impl Send for Store
impl Sync for Store
impl Unpin for Store
impl UnsafeUnpin for Store
impl UnwindSafe for Store
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