pub struct SpotInstrument { /* private fields */ }Expand description
SpotInstrument represents a spot market instrument
Implementations§
Source§impl SpotInstrument
impl SpotInstrument
Sourcepub fn new(
symbol: impl AsRef<str>,
base_currency: impl AsRef<str>,
quote_currency: impl AsRef<str>,
venue: Venue,
) -> Self
pub fn new( symbol: impl AsRef<str>, base_currency: impl AsRef<str>, quote_currency: impl AsRef<str>, venue: Venue, ) -> Self
Creates a new SpotInstrument.
Sourcepub fn base_currency(&self) -> &str
pub fn base_currency(&self) -> &str
Returns the base currency of the instrument.
Sourcepub fn quote_currency(&self) -> &str
pub fn quote_currency(&self) -> &str
Returns the quote currency of the instrument.
Trait Implementations§
Source§impl Clone for SpotInstrument
impl Clone for SpotInstrument
Source§fn clone(&self) -> SpotInstrument
fn clone(&self) -> SpotInstrument
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SpotInstrument
impl Debug for SpotInstrument
Source§impl Instrument for SpotInstrument
impl Instrument for SpotInstrument
Source§fn id(&self) -> InstrumentId
fn id(&self) -> InstrumentId
Get the instrument ID
Source§fn clone_box(&self) -> Box<dyn Instrument>
fn clone_box(&self) -> Box<dyn Instrument>
Clone this instrument into a new box
Source§fn symbol(&self) -> SmartString
fn symbol(&self) -> SmartString
Get the symbol (shorthand for id().symbol)
Auto Trait Implementations§
impl Freeze for SpotInstrument
impl RefUnwindSafe for SpotInstrument
impl Send for SpotInstrument
impl Sync for SpotInstrument
impl Unpin for SpotInstrument
impl UnwindSafe for SpotInstrument
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