#[repr(C)]pub struct SystemMsg {
pub hd: RecordHeader,
pub msg: [c_char; 303],
pub code: u8,
}Expand description
A non-error message from the Databento Live Subscription Gateway (LSG). Also used for heartbeating.
Fields§
§hd: RecordHeaderThe common header.
msg: [c_char; 303]The message from the Databento Live Subscription Gateway (LSG).
code: u8Type of system message.
Implementations§
Source§impl SystemMsg
impl SystemMsg
Sourcepub fn code(&self) -> Option<SystemCode>
pub fn code(&self) -> Option<SystemCode>
Returns the system code enum variant if one was specified, otherwise None.
Sourcepub fn is_heartbeat(&self) -> bool
pub fn is_heartbeat(&self) -> bool
Checks whether the message is a heartbeat from the gateway.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SystemMsg
impl<'de> Deserialize<'de> for SystemMsg
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<'a> From<&'a SystemMsg> for RecordRefEnum<'a>
impl<'a> From<&'a SystemMsg> for RecordRefEnum<'a>
Source§impl From<&SystemMsgV1> for SystemMsg
impl From<&SystemMsgV1> for SystemMsg
Source§impl From<SystemMsg> for RecordEnum
impl From<SystemMsg> for RecordEnum
Source§impl<'py> IntoPyObject<'py> for SystemMsg
impl<'py> IntoPyObject<'py> for SystemMsg
Source§type Output = Bound<'py, <SystemMsg as IntoPyObject<'py>>::Target>
type Output = Bound<'py, <SystemMsg as IntoPyObject<'py>>::Target>
The smart pointer type to use. Read more
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>
Performs the conversion.
Source§impl PartialOrd for SystemMsg
impl PartialOrd for SystemMsg
Source§impl PyClassImpl for SystemMsg
impl PyClassImpl for SystemMsg
Source§const IS_BASETYPE: bool = false
const IS_BASETYPE: bool = false
#[pyclass(subclass)]
Source§const IS_SUBCLASS: bool = false
const IS_SUBCLASS: bool = false
#[pyclass(extends=…)]
Source§const IS_MAPPING: bool = false
const IS_MAPPING: bool = false
#[pyclass(mapping)]
Source§const IS_SEQUENCE: bool = false
const IS_SEQUENCE: bool = false
#[pyclass(sequence)]
Source§type ThreadChecker = SendablePyClass<SystemMsg>
type ThreadChecker = SendablePyClass<SystemMsg>
This handles following two situations: Read more
Source§type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::MutableChild
type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::MutableChild
Immutable or mutable
Source§type BaseNativeType = PyAny
type BaseNativeType = PyAny
The closest native ancestor. This is
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<SystemMsg> for PyClassImplCollector<SystemMsg>
Available on crate feature python only.
impl PyClassNewTextSignature<SystemMsg> for PyClassImplCollector<SystemMsg>
Available on crate feature
python only.fn new_text_signature(self) -> Option<&'static str>
Source§impl PyMethods<SystemMsg> for PyClassImplCollector<SystemMsg>
Available on crate feature python only.
impl PyMethods<SystemMsg> for PyClassImplCollector<SystemMsg>
Available on crate feature
python only.fn py_methods(self) -> &'static PyClassItems
Source§impl PyTypeInfo for SystemMsg
impl PyTypeInfo for SystemMsg
Source§fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
Returns the PyTypeObject instance for this type.
Source§fn type_object(py: Python<'_>) -> Bound<'_, PyType>
fn type_object(py: Python<'_>) -> Bound<'_, PyType>
Returns the safe abstraction over the type object.
Source§fn type_object_bound(py: Python<'_>) -> Bound<'_, PyType>
fn type_object_bound(py: Python<'_>) -> Bound<'_, PyType>
👎Deprecated since 0.23.0: renamed to
PyTypeInfo::type_objectDeprecated name for
PyTypeInfo::type_object.Source§fn is_type_of(object: &Bound<'_, PyAny>) -> bool
fn is_type_of(object: &Bound<'_, PyAny>) -> bool
Checks if
object 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
👎Deprecated since 0.23.0: renamed to
PyTypeInfo::is_type_ofDeprecated name for
PyTypeInfo::is_type_of.Source§fn is_exact_type_of(object: &Bound<'_, PyAny>) -> bool
fn is_exact_type_of(object: &Bound<'_, PyAny>) -> bool
Checks if
object is an instance of this type.Source§fn is_exact_type_of_bound(object: &Bound<'_, PyAny>) -> bool
fn is_exact_type_of_bound(object: &Bound<'_, PyAny>) -> bool
👎Deprecated since 0.23.0: renamed to
PyTypeInfo::is_exact_type_ofDeprecated name for
PyTypeInfo::is_exact_type_of.Source§impl Record for SystemMsg
impl Record for SystemMsg
Source§fn header(&self) -> &RecordHeader
fn header(&self) -> &RecordHeader
Returns a reference to the
RecordHeader that comes at the beginning of all
record types.Source§fn record_size(&self) -> usize
fn record_size(&self) -> usize
Returns the size of the record in bytes.
Source§fn rtype(&self) -> Result<RType>
fn rtype(&self) -> Result<RType>
Tries to convert the raw record type into an enum which is useful for exhaustive
pattern matching. Read more
Source§fn publisher(&self) -> Result<Publisher>
fn publisher(&self) -> Result<Publisher>
Tries to convert the raw
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
Returns the raw primary timestamp for the record. Read more
Source§fn index_ts(&self) -> Option<OffsetDateTime>
fn index_ts(&self) -> Option<OffsetDateTime>
Returns the primary timestamp for the record. Returns
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>
Returns the primary date for the record; the date component of the primary
timestamp (
index_ts()). Returns None if the primary timestamp contains the
sentinel value for a null timestamp.Source§impl RecordMut for SystemMsg
impl RecordMut for SystemMsg
Source§fn header_mut(&mut self) -> &mut RecordHeader
fn header_mut(&mut self) -> &mut RecordHeader
Returns a mutable reference to the
RecordHeader that comes at the beginning of
all record types.impl Copy for SystemMsg
impl DerefToPyAny for SystemMsg
impl Eq for SystemMsg
impl StructuralPartialEq for SystemMsg
Auto Trait Implementations§
impl Freeze for SystemMsg
impl RefUnwindSafe for SystemMsg
impl Send for SystemMsg
impl Sync for SystemMsg
impl Unpin for SystemMsg
impl UnwindSafe for SystemMsg
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
Mutably borrows from an owned value. Read more
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>
Converts
self into an owned Python object, dropping type information.