pub struct TuneFn<I: TuneInputs, Out> { /* private fields */ }Expand description
A named, type-erased tunable function stored in a TunableSet. Constructed via
Tunable::new; callers don’t name this type directly.
Implementations§
Source§impl<I: TuneInputs, Out> TuneFn<I, Out>
impl<I: TuneInputs, Out> TuneFn<I, Out>
Source§impl<I: TuneInputs, Out: 'static> TuneFn<I, Out>
impl<I: TuneInputs, Out: 'static> TuneFn<I, Out>
Sourcepub fn execute<'a>(
&self,
inputs: <I as TuneInputs>::At<'a>,
) -> Result<Out, AutotuneError>
pub fn execute<'a>( &self, inputs: <I as TuneInputs>::At<'a>, ) -> Result<Out, AutotuneError>
Run the wrapped function on the given inputs.
Auto Trait Implementations§
impl<I, Out> Freeze for TuneFn<I, Out>
impl<I, Out> !RefUnwindSafe for TuneFn<I, Out>
impl<I, Out> Send for TuneFn<I, Out>
impl<I, Out> Sync for TuneFn<I, Out>
impl<I, Out> Unpin for TuneFn<I, Out>
impl<I, Out> UnsafeUnpin for TuneFn<I, Out>
impl<I, Out> !UnwindSafe for TuneFn<I, Out>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more