Trait xmpp::store::blob::BlobStoreInterface
source · pub trait BlobStoreInterface: Send + Sync {
// Required method
fn table<'a, 'life0, 'async_trait>(
&'a self,
table: &'life0 BlobTable
) -> Pin<Box<dyn Future<Output = Result<Box<dyn BlobTableInterface<'a>>, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait,
'a: 'async_trait,
'life0: 'async_trait;
// Provided methods
fn get_in_table<'a, 'life0, 'async_trait>(
&'a self,
entry: &'life0 BlobEntry
) -> Pin<Box<dyn Future<Output = Result<Cow<'a, [u8]>, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait,
'a: 'async_trait,
'life0: 'async_trait { ... }
fn set_in_table<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
entry: &'life1 BlobEntry,
value: &'life2 [u8]
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait { ... }
fn table_option<'life0, 'life1, 'async_trait>(
&'life0 self,
table: &'life1 BlobTable
) -> Pin<Box<dyn Future<Output = Option<Box<dyn BlobTableInterface<'_>>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
}
Expand description
The trait for data stores to implement. Allows accessing tables using a unique BlobTable
identifier.
Required Methods§
sourcefn table<'a, 'life0, 'async_trait>(
&'a self,
table: &'life0 BlobTable
) -> Pin<Box<dyn Future<Output = Result<Box<dyn BlobTableInterface<'a>>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'a: 'async_trait,
'life0: 'async_trait,
fn table<'a, 'life0, 'async_trait>(
&'a self,
table: &'life0 BlobTable
) -> Pin<Box<dyn Future<Output = Result<Box<dyn BlobTableInterface<'a>>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'a: 'async_trait,
'life0: 'async_trait,
Retrieve a specific BlobTable
, that implements BlobTableInterface
, inside the data store.
Provided Methods§
sourcefn get_in_table<'a, 'life0, 'async_trait>(
&'a self,
entry: &'life0 BlobEntry
) -> Pin<Box<dyn Future<Output = Result<Cow<'a, [u8]>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'a: 'async_trait,
'life0: 'async_trait,
fn get_in_table<'a, 'life0, 'async_trait>(
&'a self,
entry: &'life0 BlobEntry
) -> Pin<Box<dyn Future<Output = Result<Cow<'a, [u8]>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'a: 'async_trait,
'life0: 'async_trait,
Gets a specific BlobEntry
from the blob store.
sourcefn set_in_table<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
entry: &'life1 BlobEntry,
value: &'life2 [u8]
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn set_in_table<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
entry: &'life1 BlobEntry,
value: &'life2 [u8]
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Sets a specific BlobEntry
in the data store.
sourcefn table_option<'life0, 'life1, 'async_trait>(
&'life0 self,
table: &'life1 BlobTable
) -> Pin<Box<dyn Future<Output = Option<Box<dyn BlobTableInterface<'_>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn table_option<'life0, 'life1, 'async_trait>(
&'life0 self,
table: &'life1 BlobTable
) -> Pin<Box<dyn Future<Output = Option<Box<dyn BlobTableInterface<'_>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Retrieve a specific BlobTable
, logging the error if it fails.