pub struct DexExtended {
pub dex: Dex,
pub parse_pool_created_event_fn: Option<fn(Log) -> Result<PoolCreated>>,
}
Expand description
Extended DEX wrapper that adds provider-specific event parsing capabilities to the domain Dex
model.
Fields§
§dex: Dex
The core domain Dex object being extended
parse_pool_created_event_fn: Option<fn(Log) -> Result<PoolCreated>>
Function to parse pool creation events for this specific DEX
Implementations§
Source§impl DexExtended
impl DexExtended
Sourcepub fn new(dex: Dex) -> Self
pub fn new(dex: Dex) -> Self
Creates a new DexExtended
wrapper around a domain Dex
object.
Sourcepub fn set_pool_created_event_parsing(
&mut self,
parse_pool_created_event: fn(Log) -> Result<PoolCreated>,
)
pub fn set_pool_created_event_parsing( &mut self, parse_pool_created_event: fn(Log) -> Result<PoolCreated>, )
Sets the function used to parse pool creation events for this Dex.
Sourcepub fn parse_pool_created_event(&self, log: Log) -> Result<PoolCreated>
pub fn parse_pool_created_event(&self, log: Log) -> Result<PoolCreated>
Parses a pool creation event log using this DEX’s specific parsing function.
Trait Implementations§
Source§impl Clone for DexExtended
impl Clone for DexExtended
Source§fn clone(&self) -> DexExtended
fn clone(&self) -> DexExtended
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for DexExtended
impl Debug for DexExtended
Auto Trait Implementations§
impl Freeze for DexExtended
impl RefUnwindSafe for DexExtended
impl Send for DexExtended
impl Sync for DexExtended
impl Unpin for DexExtended
impl UnwindSafe for DexExtended
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,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
Converts
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>
Converts
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 more