Struct PositionKey
pub struct PositionKey {
pub venue_id: VenueId,
pub instrument_id: InstrumentId,
}Expand description
Key for position lookup: (venue_id, instrument_id).
Serializes as "venue_id/instrument_id" (e.g. "coinbase/spot:BTC-USD")
so it can be used as a JSON map key.
Fields§
§venue_id: VenueId§instrument_id: InstrumentIdTrait Implementations§
§impl Clone for PositionKey
impl Clone for PositionKey
§fn clone(&self) -> PositionKey
fn clone(&self) -> PositionKey
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for PositionKey
impl Debug for PositionKey
§impl<'de> Deserialize<'de> for PositionKey
impl<'de> Deserialize<'de> for PositionKey
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<PositionKey, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<PositionKey, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl Display for PositionKey
impl Display for PositionKey
§impl FromStr for PositionKey
impl FromStr for PositionKey
§impl Hash for PositionKey
impl Hash for PositionKey
§impl Ord for PositionKey
impl Ord for PositionKey
§impl PartialEq for PositionKey
impl PartialEq for PositionKey
§impl PartialOrd for PositionKey
impl PartialOrd for PositionKey
§impl Serialize for PositionKey
impl Serialize for PositionKey
§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 TryFrom<String> for PositionKey
impl TryFrom<String> for PositionKey
impl Eq 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§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)