pub trait AttachmentStore: Send + Sync {
// Required methods
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;
// Provided methods
fn persistence(&self) -> AttachmentStorePersistence { ... }
fn pending_manifest_commit_ids(&self) -> Vec<AttachmentId> { ... }
fn mark_manifest_committed(&self, _ids: &[AttachmentId]) { ... }
}Required Methods§
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,
Provided Methods§
fn persistence(&self) -> AttachmentStorePersistence
Sourcefn pending_manifest_commit_ids(&self) -> Vec<AttachmentId>
fn pending_manifest_commit_ids(&self) -> Vec<AttachmentId>
Attachment refs written by this store that still need their write-ahead manifest rows stamped by the next runtime commit.
Plain stores return an empty set. SessionScopedAttachmentStore
overrides this so attachments created through downstream tools,
Lashlang execution, and other runtime services are committed by the
same final turn transaction that makes them reachable from session
state.
Sourcefn mark_manifest_committed(&self, _ids: &[AttachmentId])
fn mark_manifest_committed(&self, _ids: &[AttachmentId])
Clear attachment refs that were stamped committed by a successful runtime commit.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".