pub trait AttachmentStore: Send + Sync {
// Required methods
fn put(
&self,
bytes: Vec<u8>,
meta: AttachmentCreateMeta,
) -> Result<AttachmentRef, AttachmentStoreError>;
fn get(
&self,
id: &AttachmentId,
) -> Result<StoredAttachment, AttachmentStoreError>;
// Provided method
fn persistence(&self) -> AttachmentStorePersistence { ... }
}Required Methods§
fn put( &self, bytes: Vec<u8>, meta: AttachmentCreateMeta, ) -> Result<AttachmentRef, AttachmentStoreError>
fn get( &self, id: &AttachmentId, ) -> Result<StoredAttachment, AttachmentStoreError>
Provided Methods§
fn persistence(&self) -> AttachmentStorePersistence
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".