pub struct BlobStore { /* private fields */ }Implementations§
Source§impl BlobStore
impl BlobStore
pub async fn new(db_path: PathBuf, meta_db_path: PathBuf) -> Result<Self>
pub fn subscribe(&self) -> Receiver<StoreEvent>
pub async fn get(&self, key: &str) -> Result<Option<(Bytes, BlobMetadata)>>
pub async fn get_meta(&self, key: &str) -> Result<Option<BlobMetadata>>
pub async fn put( &self, key: &str, data: Bytes, version: Vec<Version>, parents: Vec<Version>, content_type: Option<String>, ) -> Result<Vec<Version>>
pub async fn delete(&self, key: &str) -> Result<()>
Trait Implementations§
Source§impl BraidStorage for BlobStore
impl BraidStorage for BlobStore
fn put<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
data: Bytes,
meta: String,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<(Bytes, String)>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn list_keys<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Auto Trait Implementations§
impl Freeze for BlobStore
impl !RefUnwindSafe for BlobStore
impl Send for BlobStore
impl Sync for BlobStore
impl Unpin for BlobStore
impl !UnwindSafe for BlobStore
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