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<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
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<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>,
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
§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<InstrumentWire> for Instrument
impl TryFrom<InstrumentWire> for Instrument
§type Error = InvalidInstrument
type Error = InvalidInstrument
The type returned in the event of a conversion error.
§fn try_from(
wire: InstrumentWire,
) -> Result<Instrument, <Instrument as TryFrom<InstrumentWire>>::Error>
fn try_from( wire: InstrumentWire, ) -> Result<Instrument, <Instrument as TryFrom<InstrumentWire>>::Error>
Performs the conversion.
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)