Skip to main content

ReadableAccount

Trait ReadableAccount 

Source
pub trait ReadableAccount: Sized {
    // Required methods
    fn lamports(&self) -> u64;
    fn data(&self) -> &[u8] ;
    fn owner(&self) -> &Pubkey;
    fn executable(&self) -> bool;
    fn rent_epoch(&self) -> Epoch;
}
Expand description

Read-only access to account state.

Required Methods§

Source

fn lamports(&self) -> u64

Returns the lamport balance.

Source

fn data(&self) -> &[u8]

Returns the account data.

Source

fn owner(&self) -> &Pubkey

Returns the account owner.

Source

fn executable(&self) -> bool

Returns whether the account is executable.

Source

fn rent_epoch(&self) -> Epoch

Returns the rent epoch view for this account.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§