pub struct LogDecoder { /* private fields */ }Expand description
Log decoder using ABI or event signatures
Implementations§
Source§impl LogDecoder
impl LogDecoder
Sourcepub fn from_signatures(signatures: &[EventSignature]) -> Result<Self>
pub fn from_signatures(signatures: &[EventSignature]) -> Result<Self>
Create a decoder from event signatures
Sourcepub fn from_signature(signature: &EventSignature) -> Result<Self>
pub fn from_signature(signature: &EventSignature) -> Result<Self>
Create a decoder for a single event signature
Sourcepub fn add_signature(&mut self, signature: &EventSignature) -> Result<()>
pub fn add_signature(&mut self, signature: &EventSignature) -> Result<()>
Add an event signature to the decoder
Sourcepub fn decode(&self, log: &Log) -> Result<DecodedLog>
pub fn decode(&self, log: &Log) -> Result<DecodedLog>
Decode a log
Sourcepub fn can_decode(&self, log: &Log) -> bool
pub fn can_decode(&self, log: &Log) -> bool
Check if a log can be decoded by this decoder
Sourcepub fn event_names(&self) -> Vec<&str>
pub fn event_names(&self) -> Vec<&str>
Get list of event names this decoder handles
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LogDecoder
impl RefUnwindSafe for LogDecoder
impl Send for LogDecoder
impl Sync for LogDecoder
impl Unpin for LogDecoder
impl UnwindSafe for LogDecoder
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> 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