pub struct OrderHistory {
pub entries: Vec<OrderHistoryEntry>,
}
Expand description
Order history container
Fields§
§entries: Vec<OrderHistoryEntry>
List of order history entries
Implementations§
Source§impl OrderHistory
impl OrderHistory
Sourcepub fn latest_status(&self) -> Option<&OrderStatus>
pub fn latest_status(&self) -> Option<&OrderStatus>
Get the latest status of the order
Sourcepub fn status_transitions(&self) -> Vec<(&OrderStatus, &DateTime<Utc>)>
pub fn status_transitions(&self) -> Vec<(&OrderStatus, &DateTime<Utc>)>
Get all status transitions
Sourcepub fn was_rejected(&self) -> bool
pub fn was_rejected(&self) -> bool
Check if order was ever rejected
Sourcepub fn was_cancelled(&self) -> bool
pub fn was_cancelled(&self) -> bool
Check if order was cancelled
Sourcepub fn total_filled_quantity(&self) -> u32
pub fn total_filled_quantity(&self) -> u32
Get total filled quantity across all fills
Trait Implementations§
Source§impl Clone for OrderHistory
impl Clone for OrderHistory
Source§fn clone(&self) -> OrderHistory
fn clone(&self) -> OrderHistory
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for OrderHistory
impl Debug for OrderHistory
Source§impl<'de> Deserialize<'de> for OrderHistory
impl<'de> Deserialize<'de> for OrderHistory
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for OrderHistory
impl RefUnwindSafe for OrderHistory
impl Send for OrderHistory
impl Sync for OrderHistory
impl Unpin for OrderHistory
impl UnwindSafe for OrderHistory
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