Trait AccountAccess

Source
pub trait AccountAccess {
    // Required methods
    fn owner(&self) -> Result<Pubkey, DecodeError>;
    fn pubkey(&self) -> Result<Pubkey, DecodeError>;
    fn lamports(&self) -> Result<u64, DecodeError>;
    fn data(&self) -> Result<&[u8], DecodeError>;
    fn slot(&self) -> Result<u64, DecodeError>;
}
Expand description

Access an account info.

Required Methods§

Source

fn owner(&self) -> Result<Pubkey, DecodeError>

Get the owner of the account.

Source

fn pubkey(&self) -> Result<Pubkey, DecodeError>

Get the pubkey of the account.

Source

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

Get the lamports of the account.

Source

fn data(&self) -> Result<&[u8], DecodeError>

Get the account data.

Source

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

Get the slot at which the account data was updated.

Implementations on Foreign Types§

Source§

impl<A: AccountAccess> AccountAccess for &A

Implementors§