pub trait Instrument:
'static
+ Send
+ Sync
+ Debug {
// Required methods
fn id(&self) -> InstrumentId;
fn as_any(&self) -> &dyn Any;
fn clone_box(&self) -> Box<dyn Instrument>;
// Provided methods
fn symbol(&self) -> SmartString { ... }
fn venue(&self) -> Venue { ... }
}Expand description
Instrument trait for representing tradable assets on exchanges
Required Methods§
Sourcefn id(&self) -> InstrumentId
fn id(&self) -> InstrumentId
Get the instrument ID
Sourcefn clone_box(&self) -> Box<dyn Instrument>
fn clone_box(&self) -> Box<dyn Instrument>
Clone this instrument into a new box
Provided Methods§
Sourcefn symbol(&self) -> SmartString
fn symbol(&self) -> SmartString
Get the symbol (shorthand for id().symbol)