Struct Instrument
pub struct Instrument { /* private fields */ }Expand description
Rich instrument metadata.
Implementations§
§impl Instrument
impl Instrument
pub fn new( kind: InstrumentKind, venue_id: VenueId, venue_symbol: impl Into<String>, tick_size: Option<Price>, lot_size: Option<Qty>, contract_size: Option<Qty>, ) -> Result<Self, InvalidInstrument>
pub fn new_with_id( id: InstrumentId, kind: InstrumentKind, venue_id: VenueId, venue_symbol: impl Into<String>, tick_size: Option<Price>, lot_size: Option<Qty>, contract_size: Option<Qty>, ) -> Result<Self, InvalidInstrument>
pub fn id(&self) -> &InstrumentId
pub fn kind(&self) -> &InstrumentKind
pub fn venue_id(&self) -> &VenueId
pub fn venue_symbol(&self) -> &str
pub fn tick_size(&self) -> Option<Price>
pub fn lot_size(&self) -> Option<Qty>
pub fn contract_size(&self) -> Option<Qty>
Trait Implementations§
§impl Clone for Instrument
impl Clone for Instrument
§fn clone(&self) -> Instrument
fn clone(&self) -> Instrument
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 Instrument
impl Debug for Instrument
§impl<'de> Deserialize<'de> for Instrument
impl<'de> Deserialize<'de> for Instrument
§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
§impl PartialEq for Instrument
impl PartialEq for Instrument
§impl Serialize for Instrument
impl Serialize for Instrument
impl Eq for Instrument
impl StructuralPartialEq for Instrument
Auto Trait Implementations§
impl Freeze for Instrument
impl RefUnwindSafe for Instrument
impl Send for Instrument
impl Sync for Instrument
impl Unpin for Instrument
impl UnsafeUnpin for Instrument
impl UnwindSafe for Instrument
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)