Struct nash_protocol::types::exchange::Amount [−][src]
pub struct Amount {
pub precision: u32,
pub value: BigDecimal,
}
Expand description
Amount encodes the amount of asset being bought or sold in an order It is encoded with a precision that depends on the market and asset being traded. For example, in the ETH/USD market, ETH has a precision of 4. In an A/B market, amount is always in units of A.
Fields
precision: u32
value: BigDecimal
Implementations
Construct a new Amount from string and precision
Trait Implementations
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 RefUnwindSafe for Amount
impl UnwindSafe for Amount
Blanket Implementations
Mutably borrows from an owned value. Read more
Compare self to key
and return true
if they are equal.
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more