pub struct DatabentoStatistics {Show 13 fields
pub instrument_id: InstrumentId,
pub stat_type: DatabentoStatisticType,
pub update_action: DatabentoStatisticUpdateAction,
pub price: Option<Price>,
pub quantity: Option<Quantity>,
pub channel_id: u16,
pub stat_flags: u8,
pub sequence: u32,
pub ts_ref: UnixNanos,
pub ts_in_delta: i32,
pub ts_event: UnixNanos,
pub ts_recv: UnixNanos,
pub ts_init: UnixNanos,
}Expand description
Represents a market statistics snapshot.
This data type includes the populated data fields provided by Databento,
excluding publisher_id and instrument_id.
Fields§
§instrument_id: InstrumentId§stat_type: DatabentoStatisticType§update_action: DatabentoStatisticUpdateAction§price: Option<Price>§quantity: Option<Quantity>§channel_id: u16§stat_flags: u8§sequence: u32§ts_ref: UnixNanos§ts_in_delta: i32§ts_event: UnixNanos§ts_recv: UnixNanos§ts_init: UnixNanosImplementations§
Source§impl DatabentoStatistics
impl DatabentoStatistics
Sourcepub fn get_metadata(
instrument_id: &InstrumentId,
price_precision: u8,
size_precision: u8,
) -> HashMap<String, String>
pub fn get_metadata( instrument_id: &InstrumentId, price_precision: u8, size_precision: u8, ) -> HashMap<String, String>
Returns the metadata for the type, for use with serialization formats.
Sourcepub const fn new(
instrument_id: InstrumentId,
stat_type: DatabentoStatisticType,
update_action: DatabentoStatisticUpdateAction,
price: Option<Price>,
quantity: Option<Quantity>,
channel_id: u16,
stat_flags: u8,
sequence: u32,
ts_ref: UnixNanos,
ts_in_delta: i32,
ts_event: UnixNanos,
ts_recv: UnixNanos,
ts_init: UnixNanos,
) -> Self
pub const fn new( instrument_id: InstrumentId, stat_type: DatabentoStatisticType, update_action: DatabentoStatisticUpdateAction, price: Option<Price>, quantity: Option<Quantity>, channel_id: u16, stat_flags: u8, sequence: u32, ts_ref: UnixNanos, ts_in_delta: i32, ts_event: UnixNanos, ts_recv: UnixNanos, ts_init: UnixNanos, ) -> Self
Creates a new DatabentoStatistics instance.
Trait Implementations§
Source§impl Clone for DatabentoStatistics
impl Clone for DatabentoStatistics
Source§fn clone(&self) -> DatabentoStatistics
fn clone(&self) -> DatabentoStatistics
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl CustomDataTrait for DatabentoStatistics
impl CustomDataTrait for DatabentoStatistics
Source§fn clone_arc(&self) -> Arc<dyn CustomDataTrait>
fn clone_arc(&self) -> Arc<dyn CustomDataTrait>
Returns a cloned Arc of the custom data.
Source§fn eq_arc(&self, other: &dyn CustomDataTrait) -> bool
fn eq_arc(&self, other: &dyn CustomDataTrait) -> bool
Returns whether the custom data is equal to another.
Source§fn type_name_static() -> &'static str
fn type_name_static() -> &'static str
Returns the type name used in serialized form (e.g. in the
"type" field).Source§impl Debug for DatabentoStatistics
impl Debug for DatabentoStatistics
Source§impl DecodeDataFromRecordBatch for DatabentoStatistics
impl DecodeDataFromRecordBatch for DatabentoStatistics
Source§fn decode_data_batch(
metadata: &HashMap<String, String>,
record_batch: RecordBatch,
) -> Result<Vec<Data>, EncodingError>
fn decode_data_batch( metadata: &HashMap<String, String>, record_batch: RecordBatch, ) -> Result<Vec<Data>, EncodingError>
Source§impl<'de> Deserialize<'de> for DatabentoStatistics
impl<'de> Deserialize<'de> for DatabentoStatistics
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl EncodeToRecordBatch for DatabentoStatistics
impl EncodeToRecordBatch for DatabentoStatistics
Source§fn encode_batch(
metadata: &HashMap<String, String>,
data: &[Self],
) -> Result<RecordBatch, ArrowError>
fn encode_batch( metadata: &HashMap<String, String>, data: &[Self], ) -> Result<RecordBatch, ArrowError>
Encodes a batch of values into an Arrow
RecordBatch using the provided metadata. Read moreimpl Eq for DatabentoStatistics
Source§impl HasTsInit for DatabentoStatistics
impl HasTsInit for DatabentoStatistics
Source§impl Hash for DatabentoStatistics
impl Hash for DatabentoStatistics
Source§impl PartialEq for DatabentoStatistics
impl PartialEq for DatabentoStatistics
Source§fn eq(&self, other: &DatabentoStatistics) -> bool
fn eq(&self, other: &DatabentoStatistics) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for DatabentoStatistics
impl Serialize for DatabentoStatistics
impl StructuralPartialEq for DatabentoStatistics
Auto Trait Implementations§
impl Freeze for DatabentoStatistics
impl RefUnwindSafe for DatabentoStatistics
impl Send for DatabentoStatistics
impl Sync for DatabentoStatistics
impl Unpin for DatabentoStatistics
impl UnsafeUnpin for DatabentoStatistics
impl UnwindSafe for DatabentoStatistics
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<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.