pub trait PersistentField<'a, T>: Send + Syncwhere
T: Serialize + Deserialize<'a>,{
// Required methods
fn set(&self, new_value: T);
fn map<F, R>(&self, f: F) -> R
where F: Fn(&T) -> R;
}Expand description
Handles the functionality needed for persisting a non-parameter fields in a plugin’s state.
These types can be used with Params’ #[persist = "..."] attributes.
This should be implemented for some type with interior mutability containing a T.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.