pub enum PositionRef {
ByTradeId {
trade_id: TradeId,
},
AllOnSymbol {
symbol: String,
},
AllInGroup {
group_id: GroupId,
},
}Expand description
How a management signal references its target position(s).
Resolved at runtime by the backtest runner, which has access to engine state for lookup.
The minimal set is:
ByTradeId: the canonical parser path. Each entry carries an application-definedtrade_id; management signals reference it.AllOnSymbol: bulk close by symbol.AllInGroup: bulk close by group.
group is a reporting tag (channel-level), while trade_id is the
per-trade identity used for addressing.
Variants§
ByTradeId
Target the position with the given application-defined trade id.
AllOnSymbol
All open positions on a symbol.
AllInGroup
All open positions in a group.
Trait Implementations§
Source§impl Clone for PositionRef
impl Clone for PositionRef
Source§fn clone(&self) -> PositionRef
fn clone(&self) -> PositionRef
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 PositionRef
impl Debug for PositionRef
Source§impl<'de> Deserialize<'de> for PositionRef
impl<'de> Deserialize<'de> for PositionRef
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
Auto Trait Implementations§
impl Freeze for PositionRef
impl RefUnwindSafe for PositionRef
impl Send for PositionRef
impl Sync for PositionRef
impl Unpin for PositionRef
impl UnsafeUnpin for PositionRef
impl UnwindSafe for PositionRef
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