pub struct OrderPolicy {
pub reduce_only: bool,
pub position_side: PositionSide,
pub margin_mode: MarginMode,
pub position_mode: PositionMode,
pub leverage: u32,
pub post_only: bool,
}Fields§
§reduce_only: bool§position_side: PositionSide§margin_mode: MarginMode§position_mode: PositionMode§leverage: u32§post_only: boolImplementations§
Source§impl OrderPolicy
impl OrderPolicy
pub fn validate_for(&self, spec: &TradingInstrumentSpec) -> Result<(), QxError>
Trait Implementations§
Source§impl Clone for OrderPolicy
impl Clone for OrderPolicy
Source§fn clone(&self) -> OrderPolicy
fn clone(&self) -> OrderPolicy
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 moreimpl Copy for OrderPolicy
Source§impl Debug for OrderPolicy
impl Debug for OrderPolicy
Source§impl Default for OrderPolicy
impl Default for OrderPolicy
Source§fn default() -> OrderPolicy
fn default() -> OrderPolicy
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for OrderPolicy
impl<'de> Deserialize<'de> for OrderPolicy
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<OrderPolicy, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<OrderPolicy, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for OrderPolicy
Source§impl PartialEq for OrderPolicy
impl PartialEq for OrderPolicy
Source§impl Serialize for OrderPolicy
impl Serialize for OrderPolicy
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 OrderPolicy
Auto Trait Implementations§
impl Forget for OrderPolicy
impl Freeze for OrderPolicy
impl Move for OrderPolicy
impl RefUnwindSafe for OrderPolicy
impl Send for OrderPolicy
impl Sync for OrderPolicy
impl Unpin for OrderPolicy
impl UnsafeUnpin for OrderPolicy
impl UnwindSafe for OrderPolicy
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