pub trait InstrumentDefRec: HasRType {
// Required methods
fn raw_symbol(&self) -> Result<&str>;
fn asset(&self) -> Result<&str>;
fn security_type(&self) -> Result<&str>;
fn security_update_action(&self) -> Result<SecurityUpdateAction>;
fn channel_id(&self) -> u16;
}Expand description
A trait for compatibility between different versions of definition records.
Required Methods§
Sourcefn raw_symbol(&self) -> Result<&str>
fn raw_symbol(&self) -> Result<&str>
Returns the instrument raw symbol assigned by the publisher as a &str.
§Errors
This function returns an error if raw_symbol contains invalid UTF-8.
Sourcefn asset(&self) -> Result<&str>
fn asset(&self) -> Result<&str>
Returns the underlying asset code (product code) of the instrument as a &str.
§Errors
This function returns an error if asset contains invalid UTF-8.
Sourcefn security_type(&self) -> Result<&str>
fn security_type(&self) -> Result<&str>
Returns the Security type
of the instrument, e.g. FUT for future or future spread as a &str.
§Errors
This function returns an error if security_type contains invalid UTF-8.
Sourcefn security_update_action(&self) -> Result<SecurityUpdateAction>
fn security_update_action(&self) -> Result<SecurityUpdateAction>
Returns the action indicating whether the instrument definition has been added, modified, or deleted.
§Errors
This function returns an error if the security_update_action field does not
contain a valid SecurityUpdateAction.
Sourcefn channel_id(&self) -> u16
fn channel_id(&self) -> u16
The channel ID assigned by Databento as an incrementing integer starting at zero.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.