pub struct OrderCache {
pub market_id: String,
pub runners: HashMap<u64, RunnerOrders>,
pub last_update: i64,
}Fields§
§market_id: String§runners: HashMap<u64, RunnerOrders>§last_update: i64Implementations§
Source§impl OrderCache
impl OrderCache
pub fn new(market_id: String) -> Self
pub fn update_timestamp(&mut self, timestamp: i64)
pub fn get_runner(&self, selection_id: u64) -> Option<&RunnerOrders>
pub fn get_runner_mut(&mut self, selection_id: u64) -> &mut RunnerOrders
pub fn get_all_orders(&self) -> Vec<&UnmatchedOrder>
pub fn get_active_orders(&self) -> Vec<&UnmatchedOrder>
pub fn clear(&mut self)
Trait Implementations§
Source§impl Clone for OrderCache
impl Clone for OrderCache
Source§fn clone(&self) -> OrderCache
fn clone(&self) -> OrderCache
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for OrderCache
impl RefUnwindSafe for OrderCache
impl Send for OrderCache
impl Sync for OrderCache
impl Unpin for OrderCache
impl UnsafeUnpin for OrderCache
impl UnwindSafe for OrderCache
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