Struct Instrument
pub struct Instrument { /* private fields */ }Implementations§
§impl Instrument
impl Instrument
pub fn new( kind: InstrumentKind, venue_id: VenueId, venue_symbol: impl Into<String>, tick_size: Option<Decimal>, lot_size: Option<Decimal>, contract_size: Option<Decimal>, ) -> Result<Instrument, InvalidInstrument>
pub fn new_with_id( id: InstrumentId, kind: InstrumentKind, venue_id: VenueId, venue_symbol: impl Into<String>, tick_size: Option<Decimal>, lot_size: Option<Decimal>, contract_size: Option<Decimal>, ) -> Result<Instrument, 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<Decimal>
pub fn lot_size(&self) -> Option<Decimal>
pub fn contract_size(&self) -> Option<Decimal>
Trait Implementations§
§impl Clone for Instrument
impl Clone for Instrument
§fn clone(&self) -> Instrument
fn clone(&self) -> Instrument
1.0.0 (const: )§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
§impl<'de> Deserialize<'de> for Instrument
impl<'de> Deserialize<'de> for Instrument
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Instrument, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Instrument, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
§impl PartialEq for Instrument
impl PartialEq for Instrument
§impl Serialize for Instrument
impl Serialize for Instrument
§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,
§impl TryFrom<InstrumentWire> for Instrument
impl TryFrom<InstrumentWire> for Instrument
§type Error = InvalidInstrument
type Error = InvalidInstrument
§fn try_from(
wire: InstrumentWire,
) -> Result<Instrument, <Instrument as TryFrom<InstrumentWire>>::Error>
fn try_from( wire: InstrumentWire, ) -> Result<Instrument, <Instrument as TryFrom<InstrumentWire>>::Error>
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> 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)