pub trait ForecastModel {
// Required methods
fn generate_forecast(
&self,
historical_data: &[SpendingRecord],
forecast_horizon: Duration,
) -> DeviceResult<BudgetForecast>;
fn get_model_name(&self) -> String;
fn get_model_accuracy(&self) -> f64;
}Expand description
Forecast model trait
Required Methods§
fn generate_forecast( &self, historical_data: &[SpendingRecord], forecast_horizon: Duration, ) -> DeviceResult<BudgetForecast>
fn get_model_name(&self) -> String
fn get_model_accuracy(&self) -> f64
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".