Skip to main content

PersistExt

Trait PersistExt 

Source
pub trait PersistExt: Persist {
    // Required method
    async fn mutate<R>(
        &mut self,
        mutation: impl FnOnce(&mut Self::Target) -> R,
    ) -> Result<R, Self::Error>;
}
Expand description

Extension methods provided for every Persist implementation.

Required Methods§

Source

async fn mutate<R>( &mut self, mutation: impl FnOnce(&mut Self::Target) -> R, ) -> Result<R, Self::Error>

Applies a mutation to the value, persisting when done.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§