pub struct InstrumentRef {
pub exchange: String,
pub symbol: String,
}Fields§
§exchange: String§symbol: StringImplementations§
Source§impl InstrumentRef
impl InstrumentRef
pub fn new(exchange: impl Into<String>, symbol: impl Into<String>) -> Self
Sourcepub fn from_exchange_symbol(
exchange: impl Into<String>,
symbol: impl Into<String>,
) -> Self
pub fn from_exchange_symbol( exchange: impl Into<String>, symbol: impl Into<String>, ) -> Self
Heuristic convenience constructor that normalizes common exchange-specific symbol shapes.
Prefer InstrumentRef::new plus InstrumentRef::to_ticker when you want raw,
non-opinionated construction.
pub fn from_exchange_symbol_normalized( exchange: impl Into<String>, symbol: impl Into<String>, ) -> Self
pub fn from_internal_us_equity( exchange: impl Into<String>, symbol: impl Into<String>, ) -> Self
pub fn to_ticker(&self) -> Ticker
pub fn normalized_with<N>(&self, normalizer: &N) -> Selfwhere
N: SymbolNormalizer + ?Sized,
pub fn to_ticker_with<N>(&self, normalizer: &N) -> Tickerwhere
N: SymbolNormalizer + ?Sized,
pub fn to_normalized_ticker(&self) -> Ticker
Trait Implementations§
Source§impl Clone for InstrumentRef
impl Clone for InstrumentRef
Source§fn clone(&self) -> InstrumentRef
fn clone(&self) -> InstrumentRef
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 InstrumentRef
impl Debug for InstrumentRef
Source§impl From<InstrumentRef> for Ticker
impl From<InstrumentRef> for Ticker
Source§fn from(value: InstrumentRef) -> Self
fn from(value: InstrumentRef) -> Self
Converts to this type from the input type.
Source§impl Hash for InstrumentRef
impl Hash for InstrumentRef
Source§impl Ord for InstrumentRef
impl Ord for InstrumentRef
Source§fn cmp(&self, other: &InstrumentRef) -> Ordering
fn cmp(&self, other: &InstrumentRef) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for InstrumentRef
impl PartialEq for InstrumentRef
Source§impl PartialOrd for InstrumentRef
impl PartialOrd for InstrumentRef
impl Eq for InstrumentRef
impl StructuralPartialEq for InstrumentRef
Auto Trait Implementations§
impl Freeze for InstrumentRef
impl RefUnwindSafe for InstrumentRef
impl Send for InstrumentRef
impl Sync for InstrumentRef
impl Unpin for InstrumentRef
impl UnsafeUnpin for InstrumentRef
impl UnwindSafe for InstrumentRef
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> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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.