pub struct SymbolMap {
pub map: HashMap<u32, String>,
}Expand description
Struct created by Midas server to map instrument ids to tickers.
Fields§
§map: HashMap<u32, String>Implementations§
Source§impl SymbolMap
impl SymbolMap
pub fn new() -> Self
pub fn add_instrument(&mut self, ticker: &str, id: u32)
pub fn get_instrument_ticker(&self, id: u32) -> Option<String>
Sourcepub fn serialize(&self) -> Vec<u8> ⓘ
pub fn serialize(&self) -> Vec<u8> ⓘ
Binary encodes struct for response, shouldn’t be used directly.
pub fn deserialize(bytes: &[u8], offset: &mut usize) -> Result<Self>
Trait Implementations§
impl Eq for SymbolMap
impl StructuralPartialEq for SymbolMap
Auto Trait Implementations§
impl Freeze for SymbolMap
impl RefUnwindSafe for SymbolMap
impl Send for SymbolMap
impl Sync for SymbolMap
impl Unpin for SymbolMap
impl UnwindSafe for SymbolMap
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more