pub enum PositionEvent {
PositionOpened {
position_id: PositionId,
venue: Venue,
symbol: SmartString,
},
PositionUpdated {
position_id: PositionId,
venue: Venue,
symbol: SmartString,
old_amount: Decimal,
new_amount: Decimal,
},
PositionClosed {
position_id: PositionId,
venue: Venue,
symbol: SmartString,
realized_pnl: Decimal,
},
}Expand description
Event emitted when position state changes
Variants§
PositionOpened
New position opened
Fields
§
position_id: PositionIdUnique identifier for the position
§
symbol: SmartStringTrading symbol for the position
PositionUpdated
Position updated
Fields
§
position_id: PositionIdUnique identifier for the position
§
symbol: SmartStringTrading symbol for the position
§
old_amount: DecimalPrevious position amount before update
§
new_amount: DecimalNew position amount after update
PositionClosed
Position closed
Trait Implementations§
Source§impl Clone for PositionEvent
impl Clone for PositionEvent
Source§fn clone(&self) -> PositionEvent
fn clone(&self) -> PositionEvent
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for PositionEvent
impl RefUnwindSafe for PositionEvent
impl Send for PositionEvent
impl Sync for PositionEvent
impl Unpin for PositionEvent
impl UnwindSafe for PositionEvent
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