pub trait Algorithm {
type Input;
type Output;
type Params: Default;
type Error: Error;
// Required methods
fn name(&self) -> &'static str;
fn description(&self) -> &'static str;
fn execute(
&self,
input: Self::Input,
params: Self::Params,
) -> Result<Self::Output, Self::Error>;
// Provided method
fn execute_default(
&self,
input: Self::Input,
) -> Result<Self::Output, Self::Error> { ... }
}Expand description
Core trait for all algorithms in SurtGis.
Algorithms are pure functions that transform input data according to parameters.
Required Associated Types§
Required Methods§
Sourcefn description(&self) -> &'static str
fn description(&self) -> &'static str
Returns a description of what the algorithm does
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".