pub struct DynSolEvent { /* private fields */ }dyn-abi only.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<FixedBytes<32>>,
indexed: Vec<DynSolType>,
body: DynSolType,
) -> DynSolEvent
pub const fn new_unchecked( topic_0: Option<FixedBytes<32>>, indexed: Vec<DynSolType>, body: DynSolType, ) -> DynSolEvent
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<FixedBytes<32>>,
indexed: Vec<DynSolType>,
body: DynSolType,
) -> Option<DynSolEvent>
pub fn new( topic_0: Option<FixedBytes<32>>, indexed: Vec<DynSolType>, body: DynSolType, ) -> Option<DynSolEvent>
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, Error>where
I: IntoIterator<Item = FixedBytes<32>>,
pub fn decode_log_parts<I>(
&self,
topics: I,
data: &[u8],
validate: bool,
) -> Result<DecodedEvent, Error>where
I: IntoIterator<Item = FixedBytes<32>>,
Decode the event from the given log info.
Sourcepub fn decode_log_data(
&self,
log: &LogData,
validate: bool,
) -> Result<DecodedEvent, Error>
pub fn decode_log_data( &self, log: &LogData, validate: bool, ) -> Result<DecodedEvent, Error>
Decode the event from the given log info.
Sourcepub const fn topic_0(&self) -> Option<FixedBytes<32>>
pub const fn topic_0(&self) -> Option<FixedBytes<32>>
Get the selector for this event, if any.
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
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
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
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
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<T> Pointable for T
impl<T> Pointable for T
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 136 bytes