Skip to main content

AttachmentStore

Trait AttachmentStore 

Source
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§

Provided Methods§

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§