pub trait MutableStore: Debug + Clone + Send + Sync {
    fn read<'life0, 'life1, 'async_trait>(
        &'life0 self,
        name: &'life1 str
    ) -> Pin<Box<dyn Future<Output = Result<String, StoreError>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
; fn write<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        name: &'life1 str,
        content: &'life2 str
    ) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        'life2: 'async_trait,
        Self: 'async_trait
; }
Expand description

A trait for mutable stores. This is abstracted away so that users can implement a non-filesystem mutable store, which is useful for read-only filesystem environments, as on many modern hosting providers. See the book for further details on this subject.

Required Methods

Reads data from the named asset.

Writes data to the named asset. This will create a new asset if one doesn’t exist already.

Implementors