pub trait Sampler: Send {
// Required method
fn apply(
&mut self,
candidates: &mut Candidates,
ctx: &mut SamplerCtx<'_>,
) -> Result<(), Error>;
// Provided method
fn reset(&mut self) { ... }
}Expand description
One object-safe stage in a sampling chain.
Required Methods§
Sourcefn apply(
&mut self,
candidates: &mut Candidates,
ctx: &mut SamplerCtx<'_>,
) -> Result<(), Error>
fn apply( &mut self, candidates: &mut Candidates, ctx: &mut SamplerCtx<'_>, ) -> Result<(), Error>
Applies the stage to the current candidates.
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".