Trait nih_plug::params::persist::PersistentField
source · 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
.