Struct dbn::record::SymbolMappingMsg
source · #[repr(C)]pub struct SymbolMappingMsg {
pub hd: RecordHeader,
pub stype_in: u8,
pub stype_in_symbol: [c_char; 71],
pub stype_out: u8,
pub stype_out_symbol: [c_char; 71],
pub start_ts: u64,
pub end_ts: u64,
}Expand description
A symbol mapping message which maps a symbol of one SType
to another.
Fields§
§hd: RecordHeaderThe common header.
stype_in: u8The input symbology type of stype_in_symbol.
stype_in_symbol: [c_char; 71]The input symbol.
stype_out: u8The output symbology type of stype_out_symbol.
stype_out_symbol: [c_char; 71]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: SType,
stype_in_symbol: &str,
stype_out: SType,
stype_out_symbol: &str,
start_ts: u64,
end_ts: u64,
) -> Result<Self>
pub fn new( instrument_id: u32, ts_event: u64, stype_in: SType, stype_in_symbol: &str, stype_out: SType, stype_out_symbol: &str, start_ts: u64, end_ts: u64, ) -> Result<Self>
Creates a new SymbolMappingMsgV2.
§Errors
This function returns an error if stype_in_symbol or stype_out_symbol
contain more than maximum number of characters of 70.
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 SymbolMappingMsg
impl AsRef<[u8]> for SymbolMappingMsg
source§impl Clone for SymbolMappingMsg
impl Clone for SymbolMappingMsg
source§fn clone(&self) -> SymbolMappingMsg
fn clone(&self) -> SymbolMappingMsg
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for SymbolMappingMsg
impl Debug for SymbolMappingMsg
source§impl Default for SymbolMappingMsg
impl Default for SymbolMappingMsg
source§impl<'de> Deserialize<'de> for SymbolMappingMsg
impl<'de> Deserialize<'de> for SymbolMappingMsg
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<'a> From<&'a SymbolMappingMsg> for RecordRefEnum<'a>
impl<'a> From<&'a SymbolMappingMsg> for RecordRefEnum<'a>
source§fn from(rec: &'a SymbolMappingMsg) -> Self
fn from(rec: &'a SymbolMappingMsg) -> Self
source§impl From<&SymbolMappingMsgV1> for SymbolMappingMsgV2
impl From<&SymbolMappingMsgV1> for SymbolMappingMsgV2
source§fn from(old: &SymbolMappingMsgV1) -> Self
fn from(old: &SymbolMappingMsgV1) -> Self
source§impl From<SymbolMappingMsg> for RecordEnum
impl From<SymbolMappingMsg> for RecordEnum
source§fn from(rec: SymbolMappingMsg) -> Self
fn from(rec: SymbolMappingMsg) -> Self
source§impl HasPyGilRef for SymbolMappingMsg
impl HasPyGilRef for SymbolMappingMsg
§type AsRefTarget = PyCell<SymbolMappingMsg>
type AsRefTarget = PyCell<SymbolMappingMsg>
source§impl HasRType for SymbolMappingMsg
impl HasRType for SymbolMappingMsg
source§impl Hash for SymbolMappingMsg
impl Hash for SymbolMappingMsg
source§impl PartialEq for SymbolMappingMsg
impl PartialEq for SymbolMappingMsg
source§fn eq(&self, other: &SymbolMappingMsg) -> bool
fn eq(&self, other: &SymbolMappingMsg) -> bool
self and other values to be equal, and is used
by ==.source§impl PartialOrd for SymbolMappingMsg
impl PartialOrd for SymbolMappingMsg
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 SymbolMappingMsg
impl PyClass for SymbolMappingMsg
source§impl PyClassImpl for SymbolMappingMsg
impl PyClassImpl for SymbolMappingMsg
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<SymbolMappingMsg>
type ThreadChecker = SendablePyClass<SymbolMappingMsg>
§type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::MutableChild
type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::MutableChild
§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<SymbolMappingMsg> for PyClassImplCollector<SymbolMappingMsg>
Available on crate feature python only.
impl PyClassNewTextSignature<SymbolMappingMsg> for PyClassImplCollector<SymbolMappingMsg>
python only.fn new_text_signature(self) -> Option<&'static str>
source§impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a SymbolMappingMsg
impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a SymbolMappingMsg
source§impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a mut SymbolMappingMsg
impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a mut SymbolMappingMsg
source§impl PyMethods<SymbolMappingMsg> for PyClassImplCollector<SymbolMappingMsg>
Available on crate feature python only.
impl PyMethods<SymbolMappingMsg> for PyClassImplCollector<SymbolMappingMsg>
python only.fn py_methods(self) -> &'static PyClassItems
source§impl PyTypeInfo for SymbolMappingMsg
impl PyTypeInfo for SymbolMappingMsg
source§fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
source§fn type_object(py: Python<'_>) -> &PyType
fn type_object(py: Python<'_>) -> &PyType
PyTypeInfo::type_object will be replaced by PyTypeInfo::type_object_bound in a future PyO3 versionsource§fn type_object_bound(py: Python<'_>) -> Bound<'_, PyType>
fn type_object_bound(py: Python<'_>) -> Bound<'_, PyType>
source§fn is_type_of(object: &PyAny) -> bool
fn is_type_of(object: &PyAny) -> bool
PyTypeInfo::is_type_of will be replaced by PyTypeInfo::is_type_of_bound in a future PyO3 versionobject is an instance of this type or a subclass of this type.source§fn is_type_of_bound(object: &Bound<'_, PyAny>) -> bool
fn is_type_of_bound(object: &Bound<'_, PyAny>) -> bool
object is an instance of this type or a subclass of this type.source§fn is_exact_type_of(object: &PyAny) -> bool
fn is_exact_type_of(object: &PyAny) -> bool
PyTypeInfo::is_exact_type_of will be replaced by PyTypeInfo::is_exact_type_of_bound in a future PyO3 versionobject is an instance of this type.source§impl Record for SymbolMappingMsg
impl Record for SymbolMappingMsg
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 SymbolMappingMsg
impl RecordMut for SymbolMappingMsg
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 SymbolMappingMsg
impl Serialize for SymbolMappingMsg
source§impl SymbolMappingRec for SymbolMappingMsgV2
impl SymbolMappingRec for SymbolMappingMsgV2
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 SymbolMappingMsg
impl DerefToPyAny for SymbolMappingMsg
impl Eq for SymbolMappingMsg
impl StructuralPartialEq for SymbolMappingMsg
Auto Trait Implementations§
impl Freeze for SymbolMappingMsg
impl RefUnwindSafe for SymbolMappingMsg
impl Send for SymbolMappingMsg
impl Sync for SymbolMappingMsg
impl Unpin for SymbolMappingMsg
impl UnwindSafe for SymbolMappingMsg
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)