#[non_exhaustive]pub enum PositionAggregationMode {
AbsoluteSum,
MaximalSide,
NetSum,
Unknown(String),
}Expand description
The way that position values for an Account are calculated and aggregated.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
AbsoluteSum
The Position value or margin for each side (long and short) of the Position are computed independently and added together.
MaximalSide
The Position value or margin for each side (long and short) of the Position are computed independently. The Position value or margin chosen is the maximal absolute value of the two.
NetSum
The units for each side (long and short) of the Position are netted together and the resulting value (long or short) is used to compute the Position value or margin.
Unknown(String)
An unrecognized provider value, preserved for forward compatibility.
Implementations§
Trait Implementations§
Source§impl Clone for PositionAggregationMode
impl Clone for PositionAggregationMode
Source§impl Debug for PositionAggregationMode
impl Debug for PositionAggregationMode
Source§impl<'de> Deserialize<'de> for PositionAggregationMode
impl<'de> Deserialize<'de> for PositionAggregationMode
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
impl Eq for PositionAggregationMode
Source§impl Hash for PositionAggregationMode
impl Hash for PositionAggregationMode
Source§impl PartialEq for PositionAggregationMode
impl PartialEq for PositionAggregationMode
Source§impl Serialize for PositionAggregationMode
impl Serialize for PositionAggregationMode
impl StructuralPartialEq for PositionAggregationMode
Auto Trait Implementations§
impl Freeze for PositionAggregationMode
impl RefUnwindSafe for PositionAggregationMode
impl Send for PositionAggregationMode
impl Sync for PositionAggregationMode
impl Unpin for PositionAggregationMode
impl UnsafeUnpin for PositionAggregationMode
impl UnwindSafe for PositionAggregationMode
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