#[non_exhaustive]pub struct OrderLegCollection {
pub order_leg_type: Option<OrderLegType>,
pub leg_id: Option<i64>,
pub instrument: Option<AccountsInstrument>,
pub instruction: Option<Instruction>,
pub position_effect: Option<PositionEffect>,
pub quantity: Option<Decimal>,
pub quantity_type: Option<QuantityType>,
pub div_cap_gains: Option<DivCapGains>,
pub to_symbol: Option<String>,
}Expand description
One leg of an order (the security being traded plus its side / quantity).
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.order_leg_type: Option<OrderLegType>Asset class of the leg.
leg_id: Option<i64>Schwab-assigned leg id within the order.
instrument: Option<AccountsInstrument>Instrument being traded.
instruction: Option<Instruction>Side / intent (buy / sell / buy-to-cover / …).
position_effect: Option<PositionEffect>Whether the leg opens or closes a position.
quantity: Option<Decimal>Leg quantity (shares / contracts / dollars per quantity_type).
quantity_type: Option<QuantityType>How quantity is denominated.
div_cap_gains: Option<DivCapGains>Dividend / capital-gains handling for mutual-fund legs.
to_symbol: Option<String>Destination symbol for mutual-fund exchanges.
Trait Implementations§
Source§impl Clone for OrderLegCollection
impl Clone for OrderLegCollection
Source§fn clone(&self) -> OrderLegCollection
fn clone(&self) -> OrderLegCollection
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 OrderLegCollection
impl Debug for OrderLegCollection
Source§impl Default for OrderLegCollection
impl Default for OrderLegCollection
Source§fn default() -> OrderLegCollection
fn default() -> OrderLegCollection
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for OrderLegCollection
impl<'de> Deserialize<'de> for OrderLegCollection
Source§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
Source§impl Hash for OrderLegCollection
impl Hash for OrderLegCollection
Source§impl PartialEq for OrderLegCollection
impl PartialEq for OrderLegCollection
Source§fn eq(&self, other: &OrderLegCollection) -> bool
fn eq(&self, other: &OrderLegCollection) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl TryFrom<OrderLegCollection> for OrderLegRequest
impl TryFrom<OrderLegCollection> for OrderLegRequest
impl Eq for OrderLegCollection
impl StructuralPartialEq for OrderLegCollection
Auto Trait Implementations§
impl Freeze for OrderLegCollection
impl RefUnwindSafe for OrderLegCollection
impl Send for OrderLegCollection
impl Sync for OrderLegCollection
impl Unpin for OrderLegCollection
impl UnsafeUnpin for OrderLegCollection
impl UnwindSafe for OrderLegCollection
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.