pub struct DynSolEvent { /* private fields */ }
Expand description
A dynamic ABI event.
This is a representation of a Solidity event, which can be used to decode logs.
Implementations§
Source§impl DynSolEvent
impl DynSolEvent
Sourcepub const fn new_unchecked(
topic_0: Option<B256>,
indexed: Vec<DynSolType>,
body: DynSolType,
) -> Self
pub const fn new_unchecked( topic_0: Option<B256>, indexed: Vec<DynSolType>, body: DynSolType, ) -> Self
Creates a new event, without length-checking the indexed, or ensuring the body is a tuple. This allows creation of invalid events.
Sourcepub fn new(
topic_0: Option<B256>,
indexed: Vec<DynSolType>,
body: DynSolType,
) -> Option<Self>
pub fn new( topic_0: Option<B256>, indexed: Vec<DynSolType>, body: DynSolType, ) -> Option<Self>
Creates a new event.
Checks that the indexed length is less than or equal to 4, and that the body is a tuple.
Sourcepub const fn is_anonymous(&self) -> bool
pub const fn is_anonymous(&self) -> bool
True if anonymous.
Sourcepub fn decode_log_parts<I>(
&self,
topics: I,
data: &[u8],
validate: bool,
) -> Result<DecodedEvent>where
I: IntoIterator<Item = B256>,
pub fn decode_log_parts<I>(
&self,
topics: I,
data: &[u8],
validate: bool,
) -> Result<DecodedEvent>where
I: IntoIterator<Item = B256>,
Decode the event from the given log info.
Sourcepub fn decode_log_data(
&self,
log: &LogData,
validate: bool,
) -> Result<DecodedEvent>
pub fn decode_log_data( &self, log: &LogData, validate: bool, ) -> Result<DecodedEvent>
Decode the event from the given log info.
Sourcepub fn indexed(&self) -> &[DynSolType]
pub fn indexed(&self) -> &[DynSolType]
Get the indexed types.
Sourcepub fn body(&self) -> &[DynSolType]
pub fn body(&self) -> &[DynSolType]
Get the un-indexed types.
Trait Implementations§
Source§impl Clone for DynSolEvent
impl Clone for DynSolEvent
Source§fn clone(&self) -> DynSolEvent
fn clone(&self) -> DynSolEvent
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for DynSolEvent
impl Debug for DynSolEvent
Source§impl PartialEq for DynSolEvent
impl PartialEq for DynSolEvent
Source§impl Specifier<DynSolEvent> for Event
impl Specifier<DynSolEvent> for Event
Source§fn resolve(&self) -> Result<DynSolEvent>
fn resolve(&self) -> Result<DynSolEvent>
Resolve the type into a value.
impl StructuralPartialEq for DynSolEvent
Auto Trait Implementations§
impl Freeze for DynSolEvent
impl RefUnwindSafe for DynSolEvent
impl Send for DynSolEvent
impl Sync for DynSolEvent
impl Unpin for DynSolEvent
impl UnwindSafe for DynSolEvent
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)