pub struct InstrumentDefinition {
pub symbol: String,
pub base: String,
pub quote: String,
pub asset_class: AssetClass,
pub price_divisor: f64,
pub decimal_places: u32,
pub active: bool,
}Expand description
Instrument metadata used by the fetcher.
Fields§
§symbol: StringFull symbol in Dukascopy format, e.g. EURUSD.
base: StringBase instrument code.
quote: StringQuote instrument code.
asset_class: AssetClassInstrument class.
price_divisor: f64Divisor used to decode raw prices.
decimal_places: u32Number of decimal places for formatting.
active: boolWhether instrument is active in the universe.
Implementations§
Source§impl InstrumentDefinition
impl InstrumentDefinition
Sourcepub fn pair(&self) -> CurrencyPair
pub fn pair(&self) -> CurrencyPair
Returns pair representation for this instrument.
Trait Implementations§
Source§impl Clone for InstrumentDefinition
impl Clone for InstrumentDefinition
Source§fn clone(&self) -> InstrumentDefinition
fn clone(&self) -> InstrumentDefinition
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for InstrumentDefinition
impl Debug for InstrumentDefinition
Source§impl<'de> Deserialize<'de> for InstrumentDefinition
impl<'de> Deserialize<'de> for InstrumentDefinition
Source§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
Auto Trait Implementations§
impl Freeze for InstrumentDefinition
impl RefUnwindSafe for InstrumentDefinition
impl Send for InstrumentDefinition
impl Sync for InstrumentDefinition
impl Unpin for InstrumentDefinition
impl UnsafeUnpin for InstrumentDefinition
impl UnwindSafe for InstrumentDefinition
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