pub struct ObjectStorage { /* private fields */ }Expand description
In-memory object storage stub.
Implementations§
Source§impl ObjectStorage
impl ObjectStorage
pub fn new(bucket: &str) -> Self
pub fn put(&mut self, key: &str, data: Vec<u8>)
pub fn get(&self, key: &str) -> Option<&StoredObject>
pub fn delete(&mut self, key: &str) -> bool
pub fn list(&self, prefix: &str) -> Vec<&ObjectMeta>
pub fn exists(&self, key: &str) -> bool
pub fn object_count(&self) -> usize
pub fn total_size(&self) -> u64
pub fn bucket(&self) -> &str
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ObjectStorage
impl RefUnwindSafe for ObjectStorage
impl Send for ObjectStorage
impl Sync for ObjectStorage
impl Unpin for ObjectStorage
impl UnsafeUnpin for ObjectStorage
impl UnwindSafe for ObjectStorage
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