Skip to main content

KeyGenerator

Trait KeyGenerator 

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

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

Required Methods§

Source

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

Generate a key from a set of inputs.

Implementors§

Source§

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

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