pub trait AlgorithmVariant<T> {
// Required methods
fn name(&self) -> &str;
fn execute(&self, input: &T) -> Result<T, AlgorithmError>;
fn is_applicable(&self, input: &T) -> bool;
fn estimated_cost(&self, input: &T) -> f64;
}Expand description
Algorithm variant for dynamic selection
Required Methods§
fn name(&self) -> &str
fn execute(&self, input: &T) -> Result<T, AlgorithmError>
fn is_applicable(&self, input: &T) -> bool
fn estimated_cost(&self, input: &T) -> f64
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".