#[non_exhaustive]pub enum OrderPositionFill {
OpenOnly,
ReduceFirst,
ReduceOnly,
Default,
Unknown(String),
}Expand description
Specification of how Positions in the Account are modified when the Order is filled.
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.
OpenOnly
When the Order is filled, only allow Positions to be opened or extended.
ReduceFirst
When the Order is filled, always fully reduce an existing Position before opening a new Position.
ReduceOnly
When the Order is filled, only reduce an existing Position.
Default
When the Order is filled, use REDUCE_FIRST behaviour for non-client hedging Accounts, and OPEN_ONLY behaviour for client hedging Accounts.
Unknown(String)
An unrecognized provider value, preserved for forward compatibility.
Implementations§
Trait Implementations§
Source§impl Clone for OrderPositionFill
impl Clone for OrderPositionFill
Source§impl Debug for OrderPositionFill
impl Debug for OrderPositionFill
Source§impl<'de> Deserialize<'de> for OrderPositionFill
impl<'de> Deserialize<'de> for OrderPositionFill
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 OrderPositionFill
Source§impl Hash for OrderPositionFill
impl Hash for OrderPositionFill
Source§impl PartialEq for OrderPositionFill
impl PartialEq for OrderPositionFill
Source§impl Serialize for OrderPositionFill
impl Serialize for OrderPositionFill
impl StructuralPartialEq for OrderPositionFill
Auto Trait Implementations§
impl Freeze for OrderPositionFill
impl RefUnwindSafe for OrderPositionFill
impl Send for OrderPositionFill
impl Sync for OrderPositionFill
impl Unpin for OrderPositionFill
impl UnsafeUnpin for OrderPositionFill
impl UnwindSafe for OrderPositionFill
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