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§
Sourcefn owner(&self) -> Result<Pubkey, DecodeError>
fn owner(&self) -> Result<Pubkey, DecodeError>
Get the owner of the account.
Sourcefn pubkey(&self) -> Result<Pubkey, DecodeError>
fn pubkey(&self) -> Result<Pubkey, DecodeError>
Get the pubkey of the account.
Sourcefn lamports(&self) -> Result<u64, DecodeError>
fn lamports(&self) -> Result<u64, DecodeError>
Get the lamports of the account.
Sourcefn data(&self) -> Result<&[u8], DecodeError>
fn data(&self) -> Result<&[u8], DecodeError>
Get the account data.
Sourcefn slot(&self) -> Result<u64, DecodeError>
fn slot(&self) -> Result<u64, DecodeError>
Get the slot at which the account data was updated.