pub struct Symbology { /* private fields */ }Expand description
Converts between IB contracts and Nautilus instrument IDs using one configured method.
Implementations§
Source§impl Symbology
impl Symbology
pub const fn new(method: SymbologyMethod) -> Self
pub const fn method(self) -> SymbologyMethod
Sourcepub fn instrument_id(
self,
contract: &Contract,
venue: Option<Venue>,
) -> Result<InstrumentId>
pub fn instrument_id( self, contract: &Contract, venue: Option<Venue>, ) -> Result<InstrumentId>
Converts an IB contract to a Nautilus instrument ID.
§Errors
Returns an error if the instrument ID cannot be constructed.
Trait Implementations§
impl Copy for Symbology
impl Eq for Symbology
Source§impl From<SymbologyMethod> for Symbology
impl From<SymbologyMethod> for Symbology
Source§fn from(method: SymbologyMethod) -> Self
fn from(method: SymbologyMethod) -> Self
Converts to this type from the input type.
impl StructuralPartialEq for Symbology
Auto Trait Implementations§
impl Freeze for Symbology
impl RefUnwindSafe for Symbology
impl Send for Symbology
impl Sync for Symbology
impl Unpin for Symbology
impl UnsafeUnpin for Symbology
impl UnwindSafe for Symbology
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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