pub struct PitSymbolMap(/* private fields */);Expand description
A point-in-time symbol map. Useful for working with live symbology or a historical request over a single day or other situations where the symbol mappings are known not to change.
Implementations§
Source§impl PitSymbolMap
impl PitSymbolMap
Sourcepub fn from_metadata(metadata: &Metadata, date: Date) -> Result<Self>
pub fn from_metadata(metadata: &Metadata, date: Date) -> Result<Self>
Creates a new PitSymbolMap populated with the mappings from metadata for
date.
§Errors
This function returns an error if neither stype_in or stype_out are
SType::InstrumentId. It will also return an error if it can’t
parse a symbol into u32 instrument ID or if date is outside the query range
of the metadata.
Sourcepub fn on_record(&mut self, record: RecordRef<'_>) -> Result<()>
pub fn on_record(&mut self, record: RecordRef<'_>) -> Result<()>
Handles updating the mappings (if required) for a generic record.
§Errors
This function returns an error when record contains a symbol mapping
with invalid UTF-8.
Sourcepub fn on_symbol_mapping<S: SymbolMappingRec>(
&mut self,
symbol_mapping: &S,
) -> Result<()>
pub fn on_symbol_mapping<S: SymbolMappingRec>( &mut self, symbol_mapping: &S, ) -> Result<()>
Handles updating the mappings from a symbol mapping record.
§Errors
This function returns an error if the symbol contains invalid UTF-8.
Sourcepub fn on_instrument_def<D: InstrumentDefRec>(
&mut self,
instrument_def: &D,
) -> Result<()>
pub fn on_instrument_def<D: InstrumentDefRec>( &mut self, instrument_def: &D, ) -> Result<()>
Handles updating the mappings from an instrument definition record.
§Errors
This function returns an error if the symbol contains invalid UTF-8.
Trait Implementations§
Source§impl Clone for PitSymbolMap
impl Clone for PitSymbolMap
Source§fn clone(&self) -> PitSymbolMap
fn clone(&self) -> PitSymbolMap
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more