Skip to main content

SharedKey

Trait SharedKey 

Source
pub trait SharedKey: SharedReaderKey {
    // Required method
    fn save(
        &self,
        value: &Self::Value,
    ) -> impl Future<Output = Result<(), Self::Error>> + Send;
}
Expand description

Adds explicit saving capability to a typed readable resource.

Cache-backed mutation uses ordinary Shared::try_update and its explicit publication callback. This trait does not install automatic saving, flush barriers, coalescing, rollback or a runtime.

Required Methods§

Source

fn save( &self, value: &Self::Value, ) -> impl Future<Output = Result<(), Self::Error>> + Send

Saves a borrowed value using the provider’s own completion guarantee.

§Errors

Returns the original encoding or provider failure.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§