Trait AsFunctionTunableResult

Source
pub trait AsFunctionTunableResult<Marker>:
    Send
    + Sync
    + 'static {
    type Inputs: Clone;
    type Output;

    // Required method
    fn execute(
        &self,
        inputs: Self::Inputs,
    ) -> Result<Self::Output, AutotuneError>;

    // Provided method
    fn name(&self) -> &str { ... }
}
Expand description

An infallible function that can be turned into a tunable.

§Marker

The marker generic is used to work around limitations in the trait resolver that causes conflicting implementation errors.

Required Associated Types§

Source

type Inputs: Clone

Function inputs

Source

type Output

Function output

Required Methods§

Source

fn execute(&self, inputs: Self::Inputs) -> Result<Self::Output, AutotuneError>

Run a tuneable function

Provided Methods§

Source

fn name(&self) -> &str

The name of the tuneable function

Implementors§

Source§

impl<Out, Err, Func> AsFunctionTunableResult<fn() -> Result<Out, Err>> for Func
where Out: 'static, Func: Send + Sync + 'static, &'a Func: for<'a> Fn() -> Result<Out, Err>, Err: Into<AutotuneError>,

Source§

impl<Out, Err, Func, I0> AsFunctionTunableResult<fn(I0) -> Result<Out, Err>> for Func
where Out: 'static, I0: Clone + Send + 'static, Func: Send + Sync + 'static, &'a Func: for<'a> Fn(I0) -> Result<Out, Err>, Err: Into<AutotuneError>,

Source§

type Inputs = I0

Source§

type Output = Out

Source§

impl<Out, Err, Func, I0, I1> AsFunctionTunableResult<fn(I0, I1) -> Result<Out, Err>> for Func
where Out: 'static, I0: Clone + Send + 'static, I1: Clone + Send + 'static, Func: Send + Sync + 'static, &'a Func: for<'a> Fn(I0, I1) -> Result<Out, Err>, Err: Into<AutotuneError>,

Source§

impl<Out, Err, Func, I0, I1, I2> AsFunctionTunableResult<fn(I0, I1, I2) -> Result<Out, Err>> for Func
where Out: 'static, I0: Clone + Send + 'static, I1: Clone + Send + 'static, I2: Clone + Send + 'static, Func: Send + Sync + 'static, &'a Func: for<'a> Fn(I0, I1, I2) -> Result<Out, Err>, Err: Into<AutotuneError>,

Source§

impl<Out, Err, Func, I0, I1, I2, I3> AsFunctionTunableResult<fn(I0, I1, I2, I3) -> Result<Out, Err>> for Func
where Out: 'static, I0: Clone + Send + 'static, I1: Clone + Send + 'static, I2: Clone + Send + 'static, I3: Clone + Send + 'static, Func: Send + Sync + 'static, &'a Func: for<'a> Fn(I0, I1, I2, I3) -> Result<Out, Err>, Err: Into<AutotuneError>,

Source§

impl<Out, Err, Func, I0, I1, I2, I3, I4> AsFunctionTunableResult<fn(I0, I1, I2, I3, I4) -> Result<Out, Err>> for Func
where Out: 'static, I0: Clone + Send + 'static, I1: Clone + Send + 'static, I2: Clone + Send + 'static, I3: Clone + Send + 'static, I4: Clone + Send + 'static, Func: Send + Sync + 'static, &'a Func: for<'a> Fn(I0, I1, I2, I3, I4) -> Result<Out, Err>, Err: Into<AutotuneError>,

Source§

impl<Out, Err, Func, I0, I1, I2, I3, I4, I5> AsFunctionTunableResult<fn(I0, I1, I2, I3, I4, I5) -> Result<Out, Err>> for Func
where Out: 'static, I0: Clone + Send + 'static, I1: Clone + Send + 'static, I2: Clone + Send + 'static, I3: Clone + Send + 'static, I4: Clone + Send + 'static, I5: Clone + Send + 'static, Func: Send + Sync + 'static, &'a Func: for<'a> Fn(I0, I1, I2, I3, I4, I5) -> Result<Out, Err>, Err: Into<AutotuneError>,

Source§

impl<Out, Err, Func, I0, I1, I2, I3, I4, I5, I6> AsFunctionTunableResult<fn(I0, I1, I2, I3, I4, I5, I6) -> Result<Out, Err>> for Func
where Out: 'static, I0: Clone + Send + 'static, I1: Clone + Send + 'static, I2: Clone + Send + 'static, I3: Clone + Send + 'static, I4: Clone + Send + 'static, I5: Clone + Send + 'static, I6: Clone + Send + 'static, Func: Send + Sync + 'static, &'a Func: for<'a> Fn(I0, I1, I2, I3, I4, I5, I6) -> Result<Out, Err>, Err: Into<AutotuneError>,

Source§

impl<Out, Err, Func, I0, I1, I2, I3, I4, I5, I6, I7> AsFunctionTunableResult<fn(I0, I1, I2, I3, I4, I5, I6, I7) -> Result<Out, Err>> for Func
where Out: 'static, I0: Clone + Send + 'static, I1: Clone + Send + 'static, I2: Clone + Send + 'static, I3: Clone + Send + 'static, I4: Clone + Send + 'static, I5: Clone + Send + 'static, I6: Clone + Send + 'static, I7: Clone + Send + 'static, Func: Send + Sync + 'static, &'a Func: for<'a> Fn(I0, I1, I2, I3, I4, I5, I6, I7) -> Result<Out, Err>, Err: Into<AutotuneError>,

Source§

impl<Out, Err, Func, I0, I1, I2, I3, I4, I5, I6, I7, I8> AsFunctionTunableResult<fn(I0, I1, I2, I3, I4, I5, I6, I7, I8) -> Result<Out, Err>> for Func
where Out: 'static, I0: Clone + Send + 'static, I1: Clone + Send + 'static, I2: Clone + Send + 'static, I3: Clone + Send + 'static, I4: Clone + Send + 'static, I5: Clone + Send + 'static, I6: Clone + Send + 'static, I7: Clone + Send + 'static, I8: Clone + Send + 'static, Func: Send + Sync + 'static, &'a Func: for<'a> Fn(I0, I1, I2, I3, I4, I5, I6, I7, I8) -> Result<Out, Err>, Err: Into<AutotuneError>,

Source§

impl<Out, Err, Func, I0, I1, I2, I3, I4, I5, I6, I7, I8, I9> AsFunctionTunableResult<fn(I0, I1, I2, I3, I4, I5, I6, I7, I8, I9) -> Result<Out, Err>> for Func
where Out: 'static, I0: Clone + Send + 'static, I1: Clone + Send + 'static, I2: Clone + Send + 'static, I3: Clone + Send + 'static, I4: Clone + Send + 'static, I5: Clone + Send + 'static, I6: Clone + Send + 'static, I7: Clone + Send + 'static, I8: Clone + Send + 'static, I9: Clone + Send + 'static, Func: Send + Sync + 'static, &'a Func: for<'a> Fn(I0, I1, I2, I3, I4, I5, I6, I7, I8, I9) -> Result<Out, Err>, Err: Into<AutotuneError>,

Source§

impl<Out, Err, Func, I0, I1, I2, I3, I4, I5, I6, I7, I8, I9, I10> AsFunctionTunableResult<fn(I0, I1, I2, I3, I4, I5, I6, I7, I8, I9, I10) -> Result<Out, Err>> for Func
where Out: 'static, I0: Clone + Send + 'static, I1: Clone + Send + 'static, I2: Clone + Send + 'static, I3: Clone + Send + 'static, I4: Clone + Send + 'static, I5: Clone + Send + 'static, I6: Clone + Send + 'static, I7: Clone + Send + 'static, I8: Clone + Send + 'static, I9: Clone + Send + 'static, I10: Clone + Send + 'static, Func: Send + Sync + 'static, &'a Func: for<'a> Fn(I0, I1, I2, I3, I4, I5, I6, I7, I8, I9, I10) -> Result<Out, Err>, Err: Into<AutotuneError>,

Source§

impl<Out, Err, Func, I0, I1, I2, I3, I4, I5, I6, I7, I8, I9, I10, I11> AsFunctionTunableResult<fn(I0, I1, I2, I3, I4, I5, I6, I7, I8, I9, I10, I11) -> Result<Out, Err>> for Func
where Out: 'static, I0: Clone + Send + 'static, I1: Clone + Send + 'static, I2: Clone + Send + 'static, I3: Clone + Send + 'static, I4: Clone + Send + 'static, I5: Clone + Send + 'static, I6: Clone + Send + 'static, I7: Clone + Send + 'static, I8: Clone + Send + 'static, I9: Clone + Send + 'static, I10: Clone + Send + 'static, I11: Clone + Send + 'static, Func: Send + Sync + 'static, &'a Func: for<'a> Fn(I0, I1, I2, I3, I4, I5, I6, I7, I8, I9, I10, I11) -> Result<Out, Err>, Err: Into<AutotuneError>,