pub struct InMemoryAttachmentStore { /* private fields */ }Implementations§
Source§impl InMemoryAttachmentStore
impl InMemoryAttachmentStore
pub fn new() -> InMemoryAttachmentStore
Trait Implementations§
Source§impl AttachmentStore for InMemoryAttachmentStore
impl AttachmentStore for InMemoryAttachmentStore
fn put<'life0, 'async_trait>(
&'life0 self,
bytes: Vec<u8>,
meta: AttachmentCreateMeta,
) -> Pin<Box<dyn Future<Output = Result<AttachmentRef, AttachmentStoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
InMemoryAttachmentStore: '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
'life0: 'async_trait,
'life1: 'async_trait,
InMemoryAttachmentStore: '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
'life0: 'async_trait,
'life1: 'async_trait,
InMemoryAttachmentStore: 'async_trait,
fn delete<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 AttachmentId,
) -> Pin<Box<dyn Future<Output = Result<(), AttachmentStoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
InMemoryAttachmentStore: '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 list<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<StoredBlobRef>, AttachmentStoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
InMemoryAttachmentStore: 'async_trait,
fn list<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<StoredBlobRef>, AttachmentStoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
InMemoryAttachmentStore: '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.
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
'life0: 'async_trait,
'life1: 'async_trait,
InMemoryAttachmentStore: '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
'life0: 'async_trait,
'life1: 'async_trait,
InMemoryAttachmentStore: 'async_trait,
Re-fetch one blob’s current freshness signal, or
None if it is absent. Read morefn persistence(&self) -> AttachmentStorePersistence
Source§impl Default for InMemoryAttachmentStore
impl Default for InMemoryAttachmentStore
Source§fn default() -> InMemoryAttachmentStore
fn default() -> InMemoryAttachmentStore
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for InMemoryAttachmentStore
impl RefUnwindSafe for InMemoryAttachmentStore
impl Send for InMemoryAttachmentStore
impl Sync for InMemoryAttachmentStore
impl Unpin for InMemoryAttachmentStore
impl UnsafeUnpin for InMemoryAttachmentStore
impl UnwindSafe for InMemoryAttachmentStore
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