pub trait ActorIndicator: Any {
// Required methods
fn key(&self) -> usize;
fn as_any(&self) -> &dyn Any;
fn initialized(&self) -> Result<bool>;
fn handle_quote(&self, quote: &QuoteTick) -> Result<()>;
fn handle_trade(&self, trade: &TradeTick) -> Result<()>;
fn handle_bar(&self, bar: &Bar) -> Result<()>;
}Expand description
Indicator callback interface used by the actor core.
Required Methods§
Sourcefn initialized(&self) -> Result<bool>
fn initialized(&self) -> Result<bool>
Checks if the indicator is initialized.
§Errors
Returns an error if the indicator cannot report readiness.
Sourcefn handle_quote(&self, quote: &QuoteTick) -> Result<()>
fn handle_quote(&self, quote: &QuoteTick) -> Result<()>
Sourcefn handle_trade(&self, trade: &TradeTick) -> Result<()>
fn handle_trade(&self, trade: &TradeTick) -> Result<()>
Sourcefn handle_bar(&self, bar: &Bar) -> Result<()>
fn handle_bar(&self, bar: &Bar) -> Result<()>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl<T> ActorIndicator for RefCell<T>where
T: Indicator + 'static,
Available on crate feature indicators only.
impl<T> ActorIndicator for RefCell<T>where
T: Indicator + 'static,
Available on crate feature
indicators only.