Trait AnchorCPIEventsAccess

Source
pub trait AnchorCPIEventsAccess<'a> {
    // Required methods
    fn slot(&self) -> Result<u64, DecodeError>;
    fn index(&self) -> Result<Option<usize>, DecodeError>;
    fn signature(&self) -> Result<&Signature, DecodeError>;
    fn next_event<T>(&mut self) -> Result<Option<T>, DecodeError>
       where T: Decode;
}
Expand description

Access a Anchor CPI Event.

Required Methods§

Source

fn slot(&self) -> Result<u64, DecodeError>

Get the slot of the transaction where the events were generated.

Source

fn index(&self) -> Result<Option<usize>, DecodeError>

Get the index in the block of the transaction where the events were generated.

§Note

The index may be None because for old transaction info format, the index of the transaction is not provided.

Source

fn signature(&self) -> Result<&Signature, DecodeError>

Get the signature of the transaction where the events were generated.

Source

fn next_event<T>(&mut self) -> Result<Option<T>, DecodeError>
where T: Decode,

Decode next event.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§