Skip to main content

SamplerStateStore

Trait SamplerStateStore 

Source
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§

Source

fn load_sampler_state( &self, ) -> Result<Option<PersistedSamplerState>, SamplerError>

Load persisted sampler runtime state, if present.

Source

fn save_sampler_state( &self, state: &PersistedSamplerState, save_path: Option<&Path>, ) -> Result<(), SamplerError>

Save sampler runtime state, optionally mirroring to save_path.

Implementors§