pub trait SamplerStateStore: Send + Sync {
// Required methods
fn load_sampler_state(
&self,
) -> Result<Option<PersistedSamplerState>, SamplerError>;
fn save_sampler_state(
&self,
state: &PersistedSamplerState,
save_path: Option<&Path>,
) -> Result<(), SamplerError>;
}Expand description
Persistence backend for sampler runtime state.
Required Methods§
Sourcefn load_sampler_state(
&self,
) -> Result<Option<PersistedSamplerState>, SamplerError>
fn load_sampler_state( &self, ) -> Result<Option<PersistedSamplerState>, SamplerError>
Load persisted sampler runtime state, if present.
Sourcefn save_sampler_state(
&self,
state: &PersistedSamplerState,
save_path: Option<&Path>,
) -> Result<(), SamplerError>
fn save_sampler_state( &self, state: &PersistedSamplerState, save_path: Option<&Path>, ) -> Result<(), SamplerError>
Save sampler runtime state, optionally mirroring to save_path.