Struct crypto_market::Order
[−]
[src]
pub struct Order { pub kind: OrderKind, pub rate: f32, pub volume: f32, pub total: Option<f32>, }
Currency order details.
It's format used in databases and streams, in places where currency pair is always known.
Fields
kind: OrderKind
Order kind, which is an Ask
or a Bid
.
rate: f32
Price rate is a price of a unit.
volume: f32
Order volume.
total: Option<f32>
Order total value.
Methods
impl Order
[src]
fn get_total(&self) -> f32
[src]
Gets total order value from struct.
It is calculated if total
contains None
value.
fn calculate_total(&mut self) -> &Self
[src]
Sets calculated total value.
Trait Implementations
impl PartialEq for Order
[src]
fn eq(&self, __arg_0: &Order) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Order) -> bool
[src]
This method tests for !=
.
impl Clone for Order
[src]
fn clone(&self) -> Order
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more