pub enum DefiData {
Block(Block),
Pool(Pool),
PoolSnapshot(PoolSnapshot),
PoolSwap(PoolSwap),
PoolLiquidityUpdate(PoolLiquidityUpdate),
PoolFeeCollect(PoolFeeCollect),
PoolFlash(PoolFlash),
}Expand description
Represents DeFi-specific data events in a decentralized exchange ecosystem.
Variants§
Block(Block)
A block completion in a blockchain network.
Pool(Pool)
A DEX liquidity pool definition or update.
PoolSnapshot(PoolSnapshot)
A complete snapshot of a pool’s state at a specific point in time.
PoolSwap(PoolSwap)
A token swap transaction on a decentralized exchange.
PoolLiquidityUpdate(PoolLiquidityUpdate)
A liquidity update event (mint/burn) in a DEX pool.
PoolFeeCollect(PoolFeeCollect)
A fee collection event from a DEX pool position.
PoolFlash(PoolFlash)
A flash event
Implementations§
Source§impl DefiData
impl DefiData
Sourcepub fn instrument_id(&self) -> InstrumentId
pub fn instrument_id(&self) -> InstrumentId
Returns the instrument ID associated with this DeFi data.
§Panics
Panics if the variant is a Block or PoolSnapshot where instrument IDs are not applicable.
Trait Implementations§
Source§impl From<PoolFeeCollect> for DefiData
impl From<PoolFeeCollect> for DefiData
Source§fn from(value: PoolFeeCollect) -> Self
fn from(value: PoolFeeCollect) -> Self
Source§impl From<PoolLiquidityUpdate> for DefiData
impl From<PoolLiquidityUpdate> for DefiData
Source§fn from(value: PoolLiquidityUpdate) -> Self
fn from(value: PoolLiquidityUpdate) -> Self
Source§impl From<PoolSnapshot> for DefiData
impl From<PoolSnapshot> for DefiData
Source§fn from(value: PoolSnapshot) -> Self
fn from(value: PoolSnapshot) -> Self
Source§impl<'a, 'py> FromPyObject<'a, 'py> for DefiDatawhere
Self: Clone,
impl<'a, 'py> FromPyObject<'a, 'py> for DefiDatawhere
Self: Clone,
Source§impl<'py> IntoPyObject<'py> for DefiData
impl<'py> IntoPyObject<'py> for DefiData
Source§type Output = Bound<'py, <DefiData as IntoPyObject<'py>>::Target>
type Output = Bound<'py, <DefiData 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 PyClassBaseType for DefiData
impl PyClassBaseType for DefiData
type LayoutAsBase = <DefiData as PyClassImpl>::Layout
type BaseNativeType = <DefiData as PyClassImpl>::BaseNativeType
type Initializer = PyClassInitializer<DefiData>
type PyClassMutability = <DefiData as PyClassImpl>::PyClassMutability
Source§impl PyClassImpl for DefiData
impl PyClassImpl for DefiData
Source§const IS_BASETYPE: bool = true
const IS_BASETYPE: bool = true
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 DeFi-specific data events in a decentralized exchange ecosystem.
const RAW_DOC: &'static CStr = /// Represents DeFi-specific data events in a decentralized exchange ecosystem.
Source§const DOC: &'static CStr
const DOC: &'static CStr
text_signature if a constructor is defined. Read moreSource§type Layout = <<DefiData as PyClassImpl>::BaseNativeType as PyClassBaseType>::Layout<DefiData>
type Layout = <<DefiData as PyClassImpl>::BaseNativeType as PyClassBaseType>::Layout<DefiData>
Source§type ThreadChecker = NoopThreadChecker
type ThreadChecker = NoopThreadChecker
type Inventory = Pyo3MethodsInventoryForDefiData
Source§type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::ImmutableChild
type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::ImmutableChild
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 PyStubType for DefiData
impl PyStubType for DefiData
Source§fn type_output() -> TypeInfo
fn type_output() -> TypeInfo
Source§fn type_input() -> TypeInfo
fn type_input() -> TypeInfo
Source§impl PyTypeInfo for DefiData
impl PyTypeInfo for DefiData
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>
impl StructuralPartialEq for DefiData
Auto Trait Implementations§
impl Freeze for DefiData
impl RefUnwindSafe for DefiData
impl Send for DefiData
impl Sync for DefiData
impl Unpin for DefiData
impl UnsafeUnpin for DefiData
impl UnwindSafe for DefiData
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> 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.