#[repr(C)]pub struct MarkPriceUpdate {
pub instrument_id: InstrumentId,
pub value: Price,
pub ts_event: UnixNanos,
pub ts_init: UnixNanos,
}Expand description
Represents a mark price update.
Fields§
§instrument_id: InstrumentIdThe instrument ID for the mark price.
value: PriceThe mark price.
ts_event: UnixNanosUNIX timestamp (nanoseconds) when the price event occurred.
ts_init: UnixNanosUNIX timestamp (nanoseconds) when the instance was created.
Implementations§
Source§impl MarkPriceUpdate
impl MarkPriceUpdate
Sourcepub fn new(
instrument_id: InstrumentId,
value: Price,
ts_event: UnixNanos,
ts_init: UnixNanos,
) -> Self
pub fn new( instrument_id: InstrumentId, value: Price, ts_event: UnixNanos, ts_init: UnixNanos, ) -> Self
Creates a new MarkPriceUpdate instance.
Sourcepub fn get_metadata(
instrument_id: &InstrumentId,
price_precision: u8,
) -> HashMap<String, String>
pub fn get_metadata( instrument_id: &InstrumentId, price_precision: u8, ) -> HashMap<String, String>
Returns the metadata for the type, for use with serialization formats.
Sourcepub fn get_fields() -> IndexMap<String, String>
pub fn get_fields() -> IndexMap<String, String>
Returns the field map for the type, for use with Arrow schemas.
Source§impl MarkPriceUpdate
impl MarkPriceUpdate
Sourcepub fn from_pyobject(obj: &Bound<'_, PyAny>) -> PyResult<Self>
pub fn from_pyobject(obj: &Bound<'_, PyAny>) -> PyResult<Self>
Creates a new MarkPriceUpdate from a Python object.
§Errors
Returns a PyErr if attribute extraction or type conversion fails.
Trait Implementations§
Source§impl CatalogPathPrefix for MarkPriceUpdate
impl CatalogPathPrefix for MarkPriceUpdate
Source§fn path_prefix() -> &'static str
fn path_prefix() -> &'static str
Source§impl Clone for MarkPriceUpdate
impl Clone for MarkPriceUpdate
Source§fn clone(&self) -> MarkPriceUpdate
fn clone(&self) -> MarkPriceUpdate
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for MarkPriceUpdate
impl Debug for MarkPriceUpdate
Source§impl<'de> Deserialize<'de> for MarkPriceUpdate
impl<'de> Deserialize<'de> for MarkPriceUpdate
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 Display for MarkPriceUpdate
impl Display for MarkPriceUpdate
Source§impl From<MarkPriceUpdate> for Data
impl From<MarkPriceUpdate> for Data
Source§fn from(value: MarkPriceUpdate) -> Self
fn from(value: MarkPriceUpdate) -> Self
Source§impl<'a, 'py> FromPyObject<'a, 'py> for MarkPriceUpdatewhere
Self: Clone,
impl<'a, 'py> FromPyObject<'a, 'py> for MarkPriceUpdatewhere
Self: Clone,
Source§impl HasTsInit for MarkPriceUpdate
impl HasTsInit for MarkPriceUpdate
Source§impl Hash for MarkPriceUpdate
impl Hash for MarkPriceUpdate
Source§impl<'py> IntoPyObject<'py> for MarkPriceUpdate
impl<'py> IntoPyObject<'py> for MarkPriceUpdate
Source§type Target = MarkPriceUpdate
type Target = MarkPriceUpdate
Source§type Output = Bound<'py, <MarkPriceUpdate as IntoPyObject<'py>>::Target>
type Output = Bound<'py, <MarkPriceUpdate 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 MarkPriceUpdate
impl PartialEq for MarkPriceUpdate
Source§impl PyClass for MarkPriceUpdate
impl PyClass for MarkPriceUpdate
Source§impl PyClassImpl for MarkPriceUpdate
impl PyClassImpl for MarkPriceUpdate
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 = /// Represents a mark price update.
const RAW_DOC: &'static CStr = /// Represents a mark price update.
Source§const DOC: &'static CStr
const DOC: &'static CStr
text_signature if a constructor is defined. Read moreSource§type Layout = <<MarkPriceUpdate as PyClassImpl>::BaseNativeType as PyClassBaseType>::Layout<MarkPriceUpdate>
type Layout = <<MarkPriceUpdate as PyClassImpl>::BaseNativeType as PyClassBaseType>::Layout<MarkPriceUpdate>
Source§type ThreadChecker = NoopThreadChecker
type ThreadChecker = NoopThreadChecker
type Inventory = Pyo3MethodsInventoryForMarkPriceUpdate
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 lazy_type_object() -> &'static LazyTypeObject<Self>
Source§fn dict_offset() -> Option<PyObjectOffset>
fn dict_offset() -> Option<PyObjectOffset>
Source§fn weaklist_offset() -> Option<PyObjectOffset>
fn weaklist_offset() -> Option<PyObjectOffset>
Source§impl PyClassNewTextSignature for MarkPriceUpdate
impl PyClassNewTextSignature for MarkPriceUpdate
const TEXT_SIGNATURE: &'static str = "(instrument_id, value, ts_event, ts_init)"
Source§impl PyStubType for MarkPriceUpdate
impl PyStubType for MarkPriceUpdate
Source§fn type_output() -> TypeInfo
fn type_output() -> TypeInfo
Source§fn type_input() -> TypeInfo
fn type_input() -> TypeInfo
Source§impl PyTypeInfo for MarkPriceUpdate
impl PyTypeInfo for MarkPriceUpdate
Source§const NAME: &str = <Self as ::pyo3::PyClass>::NAME
const NAME: &str = <Self as ::pyo3::PyClass>::NAME
prefer using ::type_object(py).name() to get the correct runtime value
Source§const MODULE: Option<&str> = <Self as ::pyo3::impl_::pyclass::PyClassImpl>::MODULE
const MODULE: Option<&str> = <Self as ::pyo3::impl_::pyclass::PyClassImpl>::MODULE
prefer using ::type_object(py).module() to get the correct runtime value
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 Serializable for MarkPriceUpdate
impl Serializable for MarkPriceUpdate
Source§impl Serialize for MarkPriceUpdate
impl Serialize for MarkPriceUpdate
Source§impl TryFrom<Data> for MarkPriceUpdate
impl TryFrom<Data> for MarkPriceUpdate
impl Copy for MarkPriceUpdate
impl DerefToPyAny for MarkPriceUpdate
impl Eq for MarkPriceUpdate
impl StructuralPartialEq for MarkPriceUpdate
Auto Trait Implementations§
impl Freeze for MarkPriceUpdate
impl RefUnwindSafe for MarkPriceUpdate
impl Send for MarkPriceUpdate
impl Sync for MarkPriceUpdate
impl Unpin for MarkPriceUpdate
impl UnsafeUnpin for MarkPriceUpdate
impl UnwindSafe for MarkPriceUpdate
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> FromMsgPack for Twhere
T: Serializable,
impl<T> FromMsgPack for Twhere
T: Serializable,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§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.Source§impl<'py, T> IntoPyObjectNautilusExt<'py> for Twhere
T: IntoPyObjectExt<'py>,
impl<'py, T> IntoPyObjectNautilusExt<'py> for Twhere
T: IntoPyObjectExt<'py>,
Source§impl<T> PyErrArguments for T
impl<T> PyErrArguments for T
Source§impl<T> PyTypeCheck for Twhere
T: PyTypeInfo,
impl<T> PyTypeCheck for Twhere
T: PyTypeInfo,
Source§const NAME: &'static str = T::NAME
const NAME: &'static str = T::NAME
Use ::classinfo_object() instead and format the type name at runtime. Note that using built-in cast features is often better than manual PyTypeCheck usage.