pub struct PositionKey {
pub category: Category,
pub symbol: String,
pub position_idx: PositionIdx,
}Expand description
Identifies a position: one per symbol in one-way mode, two (buy and sell) in hedge mode.
Fields§
§category: CategoryProduct type.
symbol: StringSymbol, e.g. BTCUSDT.
position_idx: PositionIdxOne-way (OneWay) or one side of hedge mode (Buy/Sell).
Trait Implementations§
Source§impl Clone for PositionKey
impl Clone for PositionKey
Source§impl Debug for PositionKey
impl Debug for PositionKey
impl Eq for PositionKey
Source§impl Hash for PositionKey
impl Hash for PositionKey
Source§impl PartialEq for PositionKey
impl PartialEq for PositionKey
impl StructuralPartialEq for PositionKey
Auto Trait Implementations§
impl Freeze for PositionKey
impl RefUnwindSafe for PositionKey
impl Send for PositionKey
impl Sync for PositionKey
impl Unpin for PositionKey
impl UnsafeUnpin for PositionKey
impl UnwindSafe for PositionKey
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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.