pub struct FileAttachmentStore { /* private fields */ }Implementations§
Trait Implementations§
Source§impl AttachmentStore for FileAttachmentStore
impl AttachmentStore for FileAttachmentStore
fn persistence(&self) -> AttachmentStorePersistence
fn put<'life0, 'async_trait>(
&'life0 self,
bytes: Vec<u8>,
meta: AttachmentCreateMeta,
) -> Pin<Box<dyn Future<Output = Result<AttachmentRef, AttachmentStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 AttachmentId,
) -> Pin<Box<dyn Future<Output = Result<StoredAttachment, AttachmentStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn delete<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 AttachmentId,
) -> Pin<Box<dyn Future<Output = Result<(), AttachmentStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 AttachmentId,
) -> Pin<Box<dyn Future<Output = Result<(), AttachmentStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Remove one blob. Idempotent: deleting an absent blob is a no-op. This is
the primitive mark-and-sweep GC uses to reclaim unreferenced content;
per-session lifecycle is expressed by dropping manifest refs, never by
calling this directly for a live session.
Source§fn head<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 AttachmentId,
) -> Pin<Box<dyn Future<Output = Result<Option<StoredBlobRef>, AttachmentStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn head<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 AttachmentId,
) -> Pin<Box<dyn Future<Output = Result<Option<StoredBlobRef>, AttachmentStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Re-fetch one blob’s current freshness signal, or
None if it is absent. Read moreSource§fn list<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<StoredBlobRef>, AttachmentStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<StoredBlobRef>, AttachmentStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Enumerate every blob currently held. Used only by mark-and-sweep GC.
Large deployments may hold many blobs; backends should stream/batch
internally where possible. Order is unspecified.
Auto Trait Implementations§
impl Freeze for FileAttachmentStore
impl RefUnwindSafe for FileAttachmentStore
impl Send for FileAttachmentStore
impl Sync for FileAttachmentStore
impl Unpin for FileAttachmentStore
impl UnsafeUnpin for FileAttachmentStore
impl UnwindSafe for FileAttachmentStore
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