#[repr(C)]pub struct WithTsOut<T: HasRType> {
pub rec: T,
pub ts_out: u64,
}Expand description
Wrapper object for records that include the live gateway send timestamp (ts_out).
Fields§
§rec: TThe inner record.
ts_out: u64The live gateway send timestamp expressed as the number of nanoseconds since the UNIX epoch.
See ts_out.
Implementations§
Source§impl<T: HasRType> WithTsOut<T>
impl<T: HasRType> WithTsOut<T>
Sourcepub fn new(rec: T, ts_out: u64) -> Self
pub fn new(rec: T, ts_out: u64) -> Self
Creates a new record with ts_out. Updates the length property in
RecordHeader to ensure the additional field is accounted for.
Sourcepub fn ts_out(&self) -> OffsetDateTime
pub fn ts_out(&self) -> OffsetDateTime
Parses the raw live gateway send timestamp into a datetime.
Trait Implementations§
impl<T: Copy + HasRType> Copy for WithTsOut<T>
Source§impl<'de, T> Deserialize<'de> for WithTsOut<T>where
T: Deserialize<'de> + HasRType,
impl<'de, T> Deserialize<'de> for WithTsOut<T>where
T: Deserialize<'de> + HasRType,
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>,
impl<T: Eq + HasRType> Eq for WithTsOut<T>
Source§impl<'py> IntoPyObject<'py> for WithTsOut<MboMsg>
Available on crate feature python only.Convert WithTsOut<MboMsg> to Python, preserving the ts_out value.
impl<'py> IntoPyObject<'py> for WithTsOut<MboMsg>
python only.Convert WithTsOut<MboMsg> to Python, preserving the ts_out value.
Source§impl<'py> IntoPyObject<'py> for WithTsOut<TradeMsg>
Available on crate feature python only.Convert WithTsOut<TradeMsg> to Python, preserving the ts_out value.
impl<'py> IntoPyObject<'py> for WithTsOut<TradeMsg>
python only.Convert WithTsOut<TradeMsg> to Python, preserving the ts_out value.
Source§impl<'py> IntoPyObject<'py> for WithTsOut<Mbp1Msg>
Available on crate feature python only.Convert WithTsOut<Mbp1Msg> to Python, preserving the ts_out value.
impl<'py> IntoPyObject<'py> for WithTsOut<Mbp1Msg>
python only.Convert WithTsOut<Mbp1Msg> to Python, preserving the ts_out value.
Source§impl<'py> IntoPyObject<'py> for WithTsOut<Mbp10Msg>
Available on crate feature python only.Convert WithTsOut<Mbp10Msg> to Python, preserving the ts_out value.
impl<'py> IntoPyObject<'py> for WithTsOut<Mbp10Msg>
python only.Convert WithTsOut<Mbp10Msg> to Python, preserving the ts_out value.
Source§impl<'py> IntoPyObject<'py> for WithTsOut<BboMsg>
Available on crate feature python only.Convert WithTsOut<BboMsg> to Python, preserving the ts_out value.
impl<'py> IntoPyObject<'py> for WithTsOut<BboMsg>
python only.Convert WithTsOut<BboMsg> to Python, preserving the ts_out value.
Source§impl<'py> IntoPyObject<'py> for WithTsOut<Cmbp1Msg>
Available on crate feature python only.Convert WithTsOut<Cmbp1Msg> to Python, preserving the ts_out value.
impl<'py> IntoPyObject<'py> for WithTsOut<Cmbp1Msg>
python only.Convert WithTsOut<Cmbp1Msg> to Python, preserving the ts_out value.
Source§impl<'py> IntoPyObject<'py> for WithTsOut<CbboMsg>
Available on crate feature python only.Convert WithTsOut<CbboMsg> to Python, preserving the ts_out value.
impl<'py> IntoPyObject<'py> for WithTsOut<CbboMsg>
python only.Convert WithTsOut<CbboMsg> to Python, preserving the ts_out value.
Source§impl<'py> IntoPyObject<'py> for WithTsOut<OhlcvMsg>
Available on crate feature python only.Convert WithTsOut<OhlcvMsg> to Python, preserving the ts_out value.
impl<'py> IntoPyObject<'py> for WithTsOut<OhlcvMsg>
python only.Convert WithTsOut<OhlcvMsg> to Python, preserving the ts_out value.
Source§impl<'py> IntoPyObject<'py> for WithTsOut<StatusMsg>
Available on crate feature python only.Convert WithTsOut<StatusMsg> to Python, preserving the ts_out value.
impl<'py> IntoPyObject<'py> for WithTsOut<StatusMsg>
python only.Convert WithTsOut<StatusMsg> to Python, preserving the ts_out value.
Source§impl<'py> IntoPyObject<'py> for WithTsOut<InstrumentDefMsg>
Available on crate feature python only.Convert WithTsOut<InstrumentDefMsg> to Python, preserving the ts_out value.
impl<'py> IntoPyObject<'py> for WithTsOut<InstrumentDefMsg>
python only.Convert WithTsOut<InstrumentDefMsg> to Python, preserving the ts_out value.
Source§impl<'py> IntoPyObject<'py> for WithTsOut<ImbalanceMsg>
Available on crate feature python only.Convert WithTsOut<ImbalanceMsg> to Python, preserving the ts_out value.
impl<'py> IntoPyObject<'py> for WithTsOut<ImbalanceMsg>
python only.Convert WithTsOut<ImbalanceMsg> to Python, preserving the ts_out value.
Source§impl<'py> IntoPyObject<'py> for WithTsOut<StatMsg>
Available on crate feature python only.Convert WithTsOut<StatMsg> to Python, preserving the ts_out value.
impl<'py> IntoPyObject<'py> for WithTsOut<StatMsg>
python only.Convert WithTsOut<StatMsg> to Python, preserving the ts_out value.
Source§impl<'py> IntoPyObject<'py> for WithTsOut<ErrorMsg>
Available on crate feature python only.Convert WithTsOut<ErrorMsg> to Python, preserving the ts_out value.
impl<'py> IntoPyObject<'py> for WithTsOut<ErrorMsg>
python only.Convert WithTsOut<ErrorMsg> to Python, preserving the ts_out value.
Source§impl<'py> IntoPyObject<'py> for WithTsOut<SymbolMappingMsg>
Available on crate feature python only.Convert WithTsOut<SymbolMappingMsg> to Python, preserving the ts_out value.
impl<'py> IntoPyObject<'py> for WithTsOut<SymbolMappingMsg>
python only.Convert WithTsOut<SymbolMappingMsg> to Python, preserving the ts_out value.
Source§impl<'py> IntoPyObject<'py> for WithTsOut<SystemMsg>
Available on crate feature python only.Convert WithTsOut<SystemMsg> to Python, preserving the ts_out value.
impl<'py> IntoPyObject<'py> for WithTsOut<SystemMsg>
python only.Convert WithTsOut<SystemMsg> to Python, preserving the ts_out value.
Source§impl<'py> IntoPyObject<'py> for WithTsOut<ErrorMsg>
Available on crate feature python only.Convert WithTsOut<v1::ErrorMsg> to Python, preserving the ts_out value.
impl<'py> IntoPyObject<'py> for WithTsOut<ErrorMsg>
python only.Convert WithTsOut<v1::ErrorMsg> to Python, preserving the ts_out value.
Source§impl<'py> IntoPyObject<'py> for WithTsOut<InstrumentDefMsg>
Available on crate feature python only.Convert WithTsOut<v1::InstrumentDefMsg> to Python, preserving the ts_out value.
impl<'py> IntoPyObject<'py> for WithTsOut<InstrumentDefMsg>
python only.Convert WithTsOut<v1::InstrumentDefMsg> to Python, preserving the ts_out value.
Source§impl<'py> IntoPyObject<'py> for WithTsOut<StatMsg>
Available on crate feature python only.Convert WithTsOut<v1::StatMsg> to Python, preserving the ts_out value.
impl<'py> IntoPyObject<'py> for WithTsOut<StatMsg>
python only.Convert WithTsOut<v1::StatMsg> to Python, preserving the ts_out value.
Source§impl<'py> IntoPyObject<'py> for WithTsOut<SymbolMappingMsg>
Available on crate feature python only.Convert WithTsOut<v1::SymbolMappingMsg> to Python, preserving the ts_out value.
impl<'py> IntoPyObject<'py> for WithTsOut<SymbolMappingMsg>
python only.Convert WithTsOut<v1::SymbolMappingMsg> to Python, preserving the ts_out value.
Source§impl<'py> IntoPyObject<'py> for WithTsOut<SystemMsg>
Available on crate feature python only.Convert WithTsOut<v1::SystemMsg> to Python, preserving the ts_out value.
impl<'py> IntoPyObject<'py> for WithTsOut<SystemMsg>
python only.Convert WithTsOut<v1::SystemMsg> to Python, preserving the ts_out value.
Source§impl<'py> IntoPyObject<'py> for WithTsOut<InstrumentDefMsg>
Available on crate feature python only.Convert WithTsOut<v2::InstrumentDefMsg> to Python, preserving the ts_out value.
impl<'py> IntoPyObject<'py> for WithTsOut<InstrumentDefMsg>
python only.Convert WithTsOut<v2::InstrumentDefMsg> to Python, preserving the ts_out value.
Source§impl<T: PartialEq + HasRType> PartialEq for WithTsOut<T>
impl<T: PartialEq + HasRType> PartialEq for WithTsOut<T>
Source§impl<T: HasRType> Record for WithTsOut<T>
impl<T: HasRType> Record for WithTsOut<T>
Source§fn header(&self) -> &RecordHeader
fn header(&self) -> &RecordHeader
RecordHeader that comes at the beginning of all
record types.Source§fn raw_index_ts(&self) -> u64
fn raw_index_ts(&self) -> u64
Source§fn record_size(&self) -> usize
fn record_size(&self) -> usize
Source§fn rtype(&self) -> Result<RType>
fn rtype(&self) -> Result<RType>
Source§fn publisher(&self) -> Result<Publisher>
fn publisher(&self) -> Result<Publisher>
publisher_id into an enum which is useful for
exhaustive pattern matching. Read moreSource§fn index_ts(&self) -> Option<OffsetDateTime>
fn index_ts(&self) -> Option<OffsetDateTime>
None if the primary
timestamp contains the sentinel value for a null timestamp. Read moreSource§fn index_date(&self) -> Option<Date>
fn index_date(&self) -> Option<Date>
index_ts()). Returns None if the primary timestamp contains the
sentinel value for a null timestamp.Source§impl<T: HasRType> RecordMut for WithTsOut<T>
impl<T: HasRType> RecordMut for WithTsOut<T>
Source§fn header_mut(&mut self) -> &mut RecordHeader
fn header_mut(&mut self) -> &mut RecordHeader
RecordHeader that comes at the beginning of
all record types.impl<T: HasRType> StructuralPartialEq for WithTsOut<T>
Auto Trait Implementations§
impl<T> Freeze for WithTsOut<T>where
T: Freeze,
impl<T> RefUnwindSafe for WithTsOut<T>where
T: RefUnwindSafe,
impl<T> Send for WithTsOut<T>where
T: Send,
impl<T> Sync for WithTsOut<T>where
T: Sync,
impl<T> Unpin for WithTsOut<T>where
T: Unpin,
impl<T> UnsafeUnpin for WithTsOut<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for WithTsOut<T>where
T: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DbnEncodable for T
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<'py, T> IntoPyObjectExt<'py> for Twhere
T: IntoPyObject<'py>,
impl<'py, T> IntoPyObjectExt<'py> for Twhere
T: IntoPyObject<'py>,
Source§fn into_bound_py_any(self, py: Python<'py>) -> Result<Bound<'py, PyAny>, PyErr>
fn into_bound_py_any(self, py: Python<'py>) -> Result<Bound<'py, PyAny>, PyErr>
self into an owned Python object, dropping type information.