Struct dbn::compat::SymbolMappingMsgV1
source · #[repr(C)]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 in DBN version 1 which maps a symbol of one
SType to another.
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 SymbolMappingMsgV1
impl SymbolMappingMsgV1
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 characters of 21.
sourcepub fn stype_in_symbol(&self) -> Result<&str>
pub fn stype_in_symbol(&self) -> Result<&str>
Returns the input symbol as 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>
Returns the output symbol as 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 raw 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 raw 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 SymbolMappingMsgV1
impl Default for SymbolMappingMsgV1
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 SymbolMappingMsgV2
impl From<&SymbolMappingMsgV1> for SymbolMappingMsgV2
source§fn from(old: &SymbolMappingMsgV1) -> Self
fn from(old: &SymbolMappingMsgV1) -> Self
source§impl HasRType for SymbolMappingMsgV1
impl HasRType for SymbolMappingMsgV1
source§impl Hash for SymbolMappingMsgV1
impl Hash for SymbolMappingMsgV1
source§impl PartialEq for SymbolMappingMsgV1
impl PartialEq for SymbolMappingMsgV1
source§fn eq(&self, other: &SymbolMappingMsgV1) -> bool
fn eq(&self, other: &SymbolMappingMsgV1) -> bool
self and other values to be equal, and is used
by ==.source§impl PartialOrd for SymbolMappingMsgV1
impl PartialOrd for SymbolMappingMsgV1
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self and other) and is used by the <=
operator. Read moresource§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
§type ThreadChecker = SendablePyClass<SymbolMappingMsgV1>
type ThreadChecker = SendablePyClass<SymbolMappingMsgV1>
§type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::MutableChild
type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::MutableChild
§type BaseNativeType = PyAny
type BaseNativeType = PyAny
gil-refs only.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<SymbolMappingMsgV1> for PyClassImplCollector<SymbolMappingMsgV1>
Available on crate feature python only.
impl PyClassNewTextSignature<SymbolMappingMsgV1> for PyClassImplCollector<SymbolMappingMsgV1>
python only.fn new_text_signature(self) -> Option<&'static str>
source§impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a SymbolMappingMsgV1
impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a SymbolMappingMsgV1
source§impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a mut SymbolMappingMsgV1
impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a mut SymbolMappingMsgV1
source§impl PyMethods<SymbolMappingMsgV1> for PyClassImplCollector<SymbolMappingMsgV1>
Available on crate feature python only.
impl PyMethods<SymbolMappingMsgV1> for PyClassImplCollector<SymbolMappingMsgV1>
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_bound(py: Python<'_>) -> Bound<'_, PyType>
fn type_object_bound(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 SymbolMappingMsgV1
impl SymbolMappingRec for SymbolMappingMsgV1
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.impl Copy for SymbolMappingMsgV1
impl DerefToPyAny for SymbolMappingMsgV1
impl Eq 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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)