use smallstr::SmallString;
use super::InstrumentKind;
#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct InstrumentTicker {
bare_symbol: SmallString<[u8; 3]>,
instrument_kind: InstrumentKind,
}
impl InstrumentTicker {
pub fn new(
bare_symbol: &str,
instrument_kind: InstrumentKind,
) -> Self {
Self {
bare_symbol: SmallString::from_str(bare_symbol),
instrument_kind,
}
}
}
impl InstrumentTicker {
pub fn bare_symbol(
&self,
) -> &str {
&self.bare_symbol
}
pub fn instrument_kind(
&self,
) -> InstrumentKind {
self.instrument_kind
}
}