pub struct LogDecoder {
pub logs_map: HashMap<(Bech32ContractId, u64), ParamType>,
}
Expand description
Struct used to pass the log mappings from the Abigen
Fields§
§logs_map: HashMap<(Bech32ContractId, u64), ParamType>
A mapping of (contract-id, log-id) and param-type
Implementations§
Source§impl LogDecoder
impl LogDecoder
Sourcepub fn get_logs(&self, receipts: &[Receipt]) -> Result<Vec<String>, Error>
pub fn get_logs(&self, receipts: &[Receipt]) -> Result<Vec<String>, Error>
Get all decoded logs from the given receipts as String
Sourcepub fn get_logs_with_type<T: Tokenizable + Parameterize>(
&self,
receipts: &[Receipt],
) -> Result<Vec<T>, Error>
pub fn get_logs_with_type<T: Tokenizable + Parameterize>( &self, receipts: &[Receipt], ) -> Result<Vec<T>, Error>
Get decoded logs with specific type from the given receipts.
Note that this method returns the actual type and not a String
representation.
pub fn merge(&mut self, log_decoder: &LogDecoder)
Trait Implementations§
Source§impl Clone for LogDecoder
impl Clone for LogDecoder
Source§fn clone(&self) -> LogDecoder
fn clone(&self) -> LogDecoder
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 LogDecoder
impl Debug for LogDecoder
Source§impl Default for LogDecoder
impl Default for LogDecoder
Source§fn default() -> LogDecoder
fn default() -> LogDecoder
Returns the “default value” for a type. Read more
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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