pub enum SwapAmount {
Points {
long: f64,
short: f64,
},
Currency {
long: f64,
short: f64,
currency: String,
},
}Expand description
Nightly swap magnitude for one instrument, in broker sign convention where negative charges and positive credits.
Variants§
Points
Price points per 1.0 lot per night, applied in the instrument’s native profit-and-loss currency.
Currency
Amount per 1.0 lot per night, already expressed in the account currency.
Implementations§
Source§impl SwapAmount
impl SwapAmount
Sourcepub fn declared_currency(&self) -> Option<&str>
pub fn declared_currency(&self) -> Option<&str>
Account currency this amount is denominated in, when it declares one.
Trait Implementations§
Source§impl Clone for SwapAmount
impl Clone for SwapAmount
Source§fn clone(&self) -> SwapAmount
fn clone(&self) -> SwapAmount
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 moreSource§impl Debug for SwapAmount
impl Debug for SwapAmount
Source§impl<'de> Deserialize<'de> for SwapAmount
impl<'de> Deserialize<'de> for SwapAmount
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<SwapAmount, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<SwapAmount, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for SwapAmount
impl PartialEq for SwapAmount
Source§impl Serialize for SwapAmount
impl Serialize for SwapAmount
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for SwapAmount
Auto Trait Implementations§
impl Freeze for SwapAmount
impl RefUnwindSafe for SwapAmount
impl Send for SwapAmount
impl Sync for SwapAmount
impl Unpin for SwapAmount
impl UnsafeUnpin for SwapAmount
impl UnwindSafe for SwapAmount
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