pub trait BlobProvider:
Debug
+ Send
+ Sync {
// Required method
fn get_blob<'life0, 'life1, 'async_trait>(
&'life0 self,
blob_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>, Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}
Expand description
Provides a way of retrieving blobs. Some implementations may not need it. In that case, they can return None in the get_blob method. It can be used as extra verification if you also store the blob yourself.
Required Methods§
Sourcefn get_blob<'life0, 'life1, 'async_trait>(
&'life0 self,
blob_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>, Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_blob<'life0, 'life1, 'async_trait>(
&'life0 self,
blob_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>, Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Returns the blob for the given blob_id. If the blob is not found, it should return None.