#[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 from the live API which maps a symbol from 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 SymbolMappingMsg.
§Errors
This function returns an error if stype_in_symbol or stype_out_symbol
contain more than maximum number of 70 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 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 SymbolMappingMsg
impl From<&SymbolMappingMsgV1> for SymbolMappingMsg
Source§fn from(old: &SymbolMappingMsg) -> Self
fn from(old: &SymbolMappingMsg) -> 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 HasRType for SymbolMappingMsg
impl HasRType for SymbolMappingMsg
Source§impl Hash for SymbolMappingMsg
impl Hash for SymbolMappingMsg
Source§impl<'py> IntoPyObject<'py> for SymbolMappingMsg
impl<'py> IntoPyObject<'py> for SymbolMappingMsg
Source§type Target = SymbolMappingMsg
type Target = SymbolMappingMsg
Source§type Output = Bound<'py, <SymbolMappingMsg as IntoPyObject<'py>>::Target>
type Output = Bound<'py, <SymbolMappingMsg 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 SymbolMappingMsg
impl PartialEq for SymbolMappingMsg
Source§impl PartialOrd for SymbolMappingMsg
impl PartialOrd for SymbolMappingMsg
Source§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
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 which maps a symbol from one
/// [`SType`](crate::enums::SType) to another.
const RAW_DOC: &'static CStr = /// A symbol mapping message from the live API which maps a symbol from one /// [`SType`](crate::enums::SType) to another.
Source§const DOC: &'static CStr
const DOC: &'static CStr
text_signature if a constructor is defined. Read moreSource§type ThreadChecker = SendablePyClass<SymbolMappingMsg>
type ThreadChecker = SendablePyClass<SymbolMappingMsg>
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, stype_in_symbol, stype_out, stype_out_symbol, start_ts, end_ts)"
Source§impl<'a, 'holder, 'py> PyFunctionArgument<'a, 'holder, 'py, false> for &'holder SymbolMappingMsg
impl<'a, 'holder, 'py> PyFunctionArgument<'a, 'holder, 'py, false> for &'holder SymbolMappingMsg
Source§impl<'a, 'holder, 'py> PyFunctionArgument<'a, 'holder, 'py, false> for &'holder mut SymbolMappingMsg
impl<'a, 'holder, 'py> PyFunctionArgument<'a, 'holder, 'py, false> for &'holder 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<'_>) -> Bound<'_, PyType>
fn type_object(py: Python<'_>) -> Bound<'_, PyType>
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 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.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§impl<T> FromPyObject<'_> for T
impl<T> FromPyObject<'_> for T
Source§impl<'py, T> FromPyObjectBound<'_, 'py> for Twhere
T: FromPyObject<'py>,
impl<'py, T> FromPyObjectBound<'_, 'py> for Twhere
T: FromPyObject<'py>,
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.