pub trait BlobStore:
Debug
+ Send
+ Sync {
// Required methods
fn name(&self) -> &str;
fn put_blob(&self, data: &[u8], media_type: Option<&str>) -> Result<BlobRef>;
fn get_blob(&self, blob_id: &str) -> Result<Option<StoredBlob>>;
// Provided methods
fn has_blob(&self, blob_id: &str) -> Result<bool> { ... }
fn delete_unreferenced(
&self,
live_blob_ids: &BTreeSet<String>,
) -> Result<usize> { ... }
}Required Methods§
fn name(&self) -> &str
fn put_blob(&self, data: &[u8], media_type: Option<&str>) -> Result<BlobRef>
fn get_blob(&self, blob_id: &str) -> Result<Option<StoredBlob>>
Provided Methods§
fn has_blob(&self, blob_id: &str) -> Result<bool>
fn delete_unreferenced(&self, live_blob_ids: &BTreeSet<String>) -> Result<usize>
Implementors§
impl BlobStore for FileBlobStore
Available on non-WebAssembly only.