pub struct SymbolMappingMsgV1 {
pub hd: RecordHeader,
pub stype_in_symbol: [c_char; 22],
pub stype_out_symbol: [c_char; 22],
pub start_ts: u64,
pub end_ts: u64,
/* private fields */
}Expand description
A symbol mapping message from the live API in DBN version 1.
Fields§
§hd: RecordHeaderThe common header.
stype_in_symbol: [c_char; 22]The input symbol.
stype_out_symbol: [c_char; 22]The output symbol.
start_ts: u64The start of the mapping interval expressed as the number of nanoseconds since the UNIX epoch.
end_ts: u64The end of the mapping interval expressed as the number of nanoseconds since the UNIX epoch.
Implementations§
Source§impl SymbolMappingMsg
impl SymbolMappingMsg
Sourcepub fn new(
instrument_id: u32,
ts_event: u64,
stype_in_symbol: &str,
stype_out_symbol: &str,
start_ts: u64,
end_ts: u64,
) -> Result<Self>
pub fn new( instrument_id: u32, ts_event: u64, stype_in_symbol: &str, stype_out_symbol: &str, start_ts: u64, end_ts: u64, ) -> Result<Self>
Creates a new SymbolMappingMsg.
§Errors
This function returns an error if stype_in_symbol or stype_out_symbol
contain more than maximum number of 21 characters.
Sourcepub fn stype_in_symbol(&self) -> Result<&str>
pub fn stype_in_symbol(&self) -> Result<&str>
Parses the input symbol into a &str.
§Errors
This function returns an error if stype_in_symbol contains invalid UTF-8.
Sourcepub fn stype_out_symbol(&self) -> Result<&str>
pub fn stype_out_symbol(&self) -> Result<&str>
Parses the output symbol into a &str.
§Errors
This function returns an error if stype_out_symbol contains invalid UTF-8.
Sourcepub fn start_ts(&self) -> Option<OffsetDateTime>
pub fn start_ts(&self) -> Option<OffsetDateTime>
Parses the start of the mapping interval into a datetime.
Returns None if start_ts contains the sentinel for a null timestamp.
Sourcepub fn end_ts(&self) -> Option<OffsetDateTime>
pub fn end_ts(&self) -> Option<OffsetDateTime>
Parses the end of the mapping interval into a datetime.
Returns None if end_ts contains the sentinel for a null timestamp.
Trait Implementations§
Source§impl AsRef<[u8]> for SymbolMappingMsgV1
impl AsRef<[u8]> for SymbolMappingMsgV1
Source§impl Clone for SymbolMappingMsgV1
impl Clone for SymbolMappingMsgV1
Source§fn clone(&self) -> SymbolMappingMsgV1
fn clone(&self) -> SymbolMappingMsgV1
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SymbolMappingMsgV1
impl Debug for SymbolMappingMsgV1
Source§impl Default for SymbolMappingMsg
impl Default for SymbolMappingMsg
Source§impl<'de> Deserialize<'de> for SymbolMappingMsgV1
impl<'de> Deserialize<'de> for SymbolMappingMsgV1
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>,
Source§impl From<&SymbolMappingMsgV1> for SymbolMappingMsg
impl From<&SymbolMappingMsgV1> for SymbolMappingMsg
Source§fn from(old: &SymbolMappingMsg) -> Self
fn from(old: &SymbolMappingMsg) -> Self
Source§impl HasRType for SymbolMappingMsgV1
impl HasRType for SymbolMappingMsgV1
Source§impl Hash for SymbolMappingMsgV1
impl Hash for SymbolMappingMsgV1
Source§impl<'py> IntoPyObject<'py> for SymbolMappingMsgV1
impl<'py> IntoPyObject<'py> for SymbolMappingMsgV1
Source§type Target = SymbolMappingMsgV1
type Target = SymbolMappingMsgV1
Source§type Output = Bound<'py, <SymbolMappingMsgV1 as IntoPyObject<'py>>::Target>
type Output = Bound<'py, <SymbolMappingMsgV1 as IntoPyObject<'py>>::Target>
Source§fn into_pyobject(
self,
py: Python<'py>,
) -> Result<<Self as IntoPyObject<'_>>::Output, <Self as IntoPyObject<'_>>::Error>
fn into_pyobject( self, py: Python<'py>, ) -> Result<<Self as IntoPyObject<'_>>::Output, <Self as IntoPyObject<'_>>::Error>
Source§impl PartialEq for SymbolMappingMsgV1
impl PartialEq for SymbolMappingMsgV1
Source§impl PartialOrd for SymbolMappingMsgV1
impl PartialOrd for SymbolMappingMsgV1
Source§impl PyClass for SymbolMappingMsgV1
impl PyClass for SymbolMappingMsgV1
Source§impl PyClassImpl for SymbolMappingMsgV1
impl PyClassImpl for SymbolMappingMsgV1
Source§const IS_BASETYPE: bool = false
const IS_BASETYPE: bool = false
Source§const IS_SUBCLASS: bool = false
const IS_SUBCLASS: bool = false
Source§const IS_MAPPING: bool = false
const IS_MAPPING: bool = false
Source§const IS_SEQUENCE: bool = false
const IS_SEQUENCE: bool = false
Source§const IS_IMMUTABLE_TYPE: bool = false
const IS_IMMUTABLE_TYPE: bool = false
Source§const RAW_DOC: &'static CStr = /// A symbol mapping message from the live API in DBN version 1.
const RAW_DOC: &'static CStr = /// A symbol mapping message from the live API in DBN version 1.
Source§const DOC: &'static CStr
const DOC: &'static CStr
text_signature if a constructor is defined. Read moreSource§type ThreadChecker = SendablePyClass<SymbolMappingMsgV1>
type ThreadChecker = SendablePyClass<SymbolMappingMsgV1>
Source§type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::MutableChild
type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::MutableChild
Source§type BaseNativeType = PyAny
type BaseNativeType = PyAny
PyAny by default, and when you declare
#[pyclass(extends=PyDict)], it’s PyDict.fn items_iter() -> PyClassItemsIter
fn dict_offset() -> Option<Py_ssize_t>
fn lazy_type_object() -> &'static LazyTypeObject<Self>
fn weaklist_offset() -> Option<isize>
Source§impl PyClassNewTextSignature for SymbolMappingMsg
Available on crate feature python only.
impl PyClassNewTextSignature for SymbolMappingMsg
python only.const TEXT_SIGNATURE: &'static str = "(publisher_id, instrument_id, ts_event, stype_in_symbol, stype_out_symbol, start_ts, end_ts)"
Source§impl PyMethods<SymbolMappingMsgV1> for PyClassImplCollector<SymbolMappingMsg>
Available on crate feature python only.
impl PyMethods<SymbolMappingMsgV1> for PyClassImplCollector<SymbolMappingMsg>
python only.fn py_methods(self) -> &'static PyClassItems
Source§impl PyTypeInfo for SymbolMappingMsgV1
impl PyTypeInfo for SymbolMappingMsgV1
Source§fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
Source§fn type_object(py: Python<'_>) -> Bound<'_, PyType>
fn type_object(py: Python<'_>) -> Bound<'_, PyType>
Source§impl Record for SymbolMappingMsgV1
impl Record for SymbolMappingMsgV1
Source§fn header(&self) -> &RecordHeader
fn header(&self) -> &RecordHeader
RecordHeader that comes at the beginning of all
record types.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 raw_index_ts(&self) -> u64
fn raw_index_ts(&self) -> u64
Source§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 RecordMut for SymbolMappingMsgV1
impl RecordMut for SymbolMappingMsgV1
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.Source§impl Serialize for SymbolMappingMsgV1
impl Serialize for SymbolMappingMsgV1
Source§impl SymbolMappingRec for SymbolMappingMsg
impl SymbolMappingRec for SymbolMappingMsg
Source§fn start_ts(&self) -> Option<OffsetDateTime>
fn start_ts(&self) -> Option<OffsetDateTime>
None if
start_ts contains the sentinel for a null timestamp.Source§fn end_ts(&self) -> Option<OffsetDateTime>
fn end_ts(&self) -> Option<OffsetDateTime>
None if
end_ts contains the sentinel for a null timestamp.Source§impl WritePyRepr for SymbolMappingMsgV1
Available on crate feature python only.
impl WritePyRepr for SymbolMappingMsgV1
python only.Source§fn write_py_repr(&self, s: &mut String) -> Result
fn write_py_repr(&self, s: &mut String) -> Result
s. Read moreSource§const SHOULD_FLATTEN: bool = false
const SHOULD_FLATTEN: bool = false
impl Copy for SymbolMappingMsgV1
impl DerefToPyAny for SymbolMappingMsgV1
impl Eq for SymbolMappingMsgV1
impl ExtractPyClassWithClone for SymbolMappingMsgV1
impl StructuralPartialEq for SymbolMappingMsgV1
Auto Trait Implementations§
impl Freeze for SymbolMappingMsgV1
impl RefUnwindSafe for SymbolMappingMsgV1
impl Send for SymbolMappingMsgV1
impl Sync for SymbolMappingMsgV1
impl Unpin for SymbolMappingMsgV1
impl UnwindSafe for SymbolMappingMsgV1
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,
Source§impl<'a, 'py, T> FromPyObject<'a, 'py> for T
impl<'a, 'py, T> FromPyObject<'a, 'py> for T
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.