pub struct PriceAlert { /* private fields */ }
Expand description
A PriceAlert
struct for setting up price alerts on trading symbols.
This struct allows to set high and low price alerts for specific trading symbols. Alerts are triggered based on the bid price of the symbol.
Implementations§
Source§impl PriceAlert
impl PriceAlert
pub fn new() -> Self
pub fn get_price(&self, symbol_id: u32) -> Option<f64>
pub fn on_price( &mut self, symbol_id: u32, price: (f64, f64), ) -> Option<Vec<String>>
Sourcepub fn modify_price(&mut self, alert_id: String, price: f64) -> Option<AlertSet>
pub fn modify_price(&mut self, alert_id: String, price: f64) -> Option<AlertSet>
Modify the price
- Returns the new AlertSet
pub fn remove(&mut self, alert_id: String) -> Option<AlertSet>
pub fn set_alert( &mut self, symbol_id: u32, set: AlertSet, alert_id: Option<String>, ) -> String
Auto Trait Implementations§
impl Freeze for PriceAlert
impl RefUnwindSafe for PriceAlert
impl Send for PriceAlert
impl Sync for PriceAlert
impl Unpin for PriceAlert
impl UnwindSafe for PriceAlert
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more