Skip to main content

KeyGenerator

Trait KeyGenerator 

Source
pub trait KeyGenerator<K, I>:
    Send
    + Sync
    + 'static
where I: TuneInputs,
{ // Required method fn generate(&self, inputs: &<I as TuneInputs>::At<'_>) -> K; }
Expand description

Produces an autotune key from a borrowed view of the tuning inputs.

Required Methods§

Source

fn generate(&self, inputs: &<I as TuneInputs>::At<'_>) -> K

Generate a key from a set of inputs.

Implementors§

Source§

impl<K, I, Func> KeyGenerator<K, I> for Func
where I: TuneInputs, Func: Send + Sync + 'static + for<'a> Fn(&<I as TuneInputs>::At<'a>) -> K,

Any for<'a> Fn(&I::At<'a>) -> K is a KeyGenerator.