pub struct TransactionDecoder<'a> { /* private fields */ }
Expand description
Transaction Decoder.
Implementations§
Source§impl<'a> TransactionDecoder<'a>
impl<'a> TransactionDecoder<'a>
Sourcepub fn new(
slot: u64,
signature: Signature,
transaction: &'a EncodedTransactionWithStatusMeta,
) -> Self
pub fn new( slot: u64, signature: Signature, transaction: &'a EncodedTransactionWithStatusMeta, ) -> Self
Create a new transaction decoder.
Sourcepub fn add_cpi_event_program_id(
&mut self,
program_id: &Pubkey,
) -> Result<&mut Self, DecodeError>
pub fn add_cpi_event_program_id( &mut self, program_id: &Pubkey, ) -> Result<&mut Self, DecodeError>
Add a Program ID to the CPI Event filter.
Add a Event authority and its Program ID to the CPI Event filter.
Sourcepub fn set_cpi_event_filter(&mut self, filter: CPIEventFilter) -> &mut Self
pub fn set_cpi_event_filter(&mut self, filter: CPIEventFilter) -> &mut Self
Set CPI events filter.
Sourcepub fn transaction(&self) -> &EncodedTransactionWithStatusMeta
pub fn transaction(&self) -> &EncodedTransactionWithStatusMeta
Get transaction.
Sourcepub fn extract_cpi_events(&self) -> Result<CPIEvents, DecodeError>
pub fn extract_cpi_events(&self) -> Result<CPIEvents, DecodeError>
Extract CPI events.
Trait Implementations§
Source§impl Decoder for TransactionDecoder<'_>
impl Decoder for TransactionDecoder<'_>
Source§fn decode_account<V>(&self, _visitor: V) -> Result<V::Value, DecodeError>where
V: Visitor,
fn decode_account<V>(&self, _visitor: V) -> Result<V::Value, DecodeError>where
V: Visitor,
Hint that the visitor is expecting an
AccountInfo
.Source§fn decode_transaction<V>(&self, _visitor: V) -> Result<V::Value, DecodeError>where
V: Visitor,
fn decode_transaction<V>(&self, _visitor: V) -> Result<V::Value, DecodeError>where
V: Visitor,
Hint that the visitor is expecting a
Transaction
.Source§fn decode_anchor_cpi_events<V>(
&self,
visitor: V,
) -> Result<V::Value, DecodeError>where
V: Visitor,
fn decode_anchor_cpi_events<V>(
&self,
visitor: V,
) -> Result<V::Value, DecodeError>where
V: Visitor,
Hint that the visitor is expecting
AnchorCPIEvent
list.Source§fn decode_owned_data<V>(&self, _visitor: V) -> Result<V::Value, DecodeError>where
V: Visitor,
fn decode_owned_data<V>(&self, _visitor: V) -> Result<V::Value, DecodeError>where
V: Visitor,
Hint that the visitor is expecting a
OwnedData
. Read moreSource§fn decode_bytes<V>(&self, _visitor: V) -> Result<V::Value, DecodeError>where
V: Visitor,
fn decode_bytes<V>(&self, _visitor: V) -> Result<V::Value, DecodeError>where
V: Visitor,
Hint that the visitor is expecting a
Data
. Read moreAuto Trait Implementations§
impl<'a> Freeze for TransactionDecoder<'a>
impl<'a> RefUnwindSafe for TransactionDecoder<'a>
impl<'a> Send for TransactionDecoder<'a>
impl<'a> Sync for TransactionDecoder<'a>
impl<'a> Unpin for TransactionDecoder<'a>
impl<'a> UnwindSafe for TransactionDecoder<'a>
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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