pub trait AsFunctionTunable<Marker>:
Sized
+ Send
+ Sync
+ 'static {
type Inputs: Clone;
type Output;
// Required method
fn execute(&self, inputs: Self::Inputs) -> Self::Output;
// Provided methods
fn ok(self) -> FunctionTunableResultMap<Self, Marker> { ... }
fn name(&self) -> &str { ... }
}
Expand description
A 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§
Required Methods§
Provided Methods§
Sourcefn ok(self) -> FunctionTunableResultMap<Self, Marker>
fn ok(self) -> FunctionTunableResultMap<Self, Marker>
Wrap infallible tunable with Ok
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.