Struct fuels_programs::logs::LogDecoder
source · pub struct LogDecoder {
pub log_formatters: HashMap<LogId, LogFormatter>,
}
Expand description
Struct used to pass the log mappings from the Abigen
Fields§
§log_formatters: HashMap<LogId, LogFormatter>
A mapping of LogId and param-type
Implementations§
source§impl LogDecoder
impl LogDecoder
sourcepub fn decode_logs(&self, receipts: &[Receipt]) -> LogResult
pub fn decode_logs(&self, receipts: &[Receipt]) -> LogResult
Get all logs results from the given receipts as Result<String>
sourcepub fn decode_logs_with_type<T: Tokenizable + Parameterize + 'static>(
&self,
receipts: &[Receipt]
) -> Result<Vec<T>>
pub fn decode_logs_with_type<T: Tokenizable + Parameterize + 'static>( &self, receipts: &[Receipt] ) -> Result<Vec<T>>
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 RefUnwindSafe for LogDecoder
impl Send for LogDecoder
impl Sync for LogDecoder
impl Unpin for LogDecoder
impl UnwindSafe for LogDecoder
Blanket Implementations§
source§impl<T> AnyDebug for Twhere
T: Any + Debug,
impl<T> AnyDebug for Twhere T: Any + Debug,
source§fn as_any_ref(&self) -> &(dyn Any + 'static)
fn as_any_ref(&self) -> &(dyn Any + 'static)
Returns a reference to the underlying type as
Any
.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