Skip to main content

Persist

Trait Persist 

Source
pub trait Persist:
    Serialize
    + DeserializeOwned
    + Send
    + Sync
    + 'static { }
Expand description

A value that can be persisted to SDK-managed storage.

This exists purely as a shorthand for the bounds every stored value must satisfy, so they don’t have to be repeated at every use site. It carries no behavior and is implemented automatically for any type that meets them.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§

Source§

impl<T: Serialize + DeserializeOwned + Send + Sync + 'static> Persist for T