pub trait MarketProcess: StochasticProcess {
// Required methods
fn get_price(&self, state: &Self::State) -> f64;
fn add_price_impact(&self, state: &mut Self::State, impact: f64);
// Provided methods
fn get_volatility(&self, _state: &Self::State) -> Option<f64> { ... }
fn get_drift(&self, _state: &Self::State) -> Option<f64> { ... }
fn get_parameters(&self) -> Option<HashMap<String, f64>> { ... }
}Required Methods§
fn get_price(&self, state: &Self::State) -> f64
fn add_price_impact(&self, state: &mut Self::State, impact: f64)
Provided Methods§
fn get_volatility(&self, _state: &Self::State) -> Option<f64>
fn get_drift(&self, _state: &Self::State) -> Option<f64>
fn get_parameters(&self) -> Option<HashMap<String, f64>>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".