solana_account

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;

    // Provided method
    fn to_account_shared_data(&self) -> AccountSharedData { ... }
}

Required Methods§

Source

fn lamports(&self) -> u64

Source

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

Source

fn owner(&self) -> &Pubkey

Source

fn executable(&self) -> bool

Source

fn rent_epoch(&self) -> Epoch

Provided Methods§

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.

Implementations on Foreign Types§

Source§

impl ReadableAccount for Ref<'_, Account>

Source§

fn lamports(&self) -> u64

Source§

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

Source§

fn owner(&self) -> &Pubkey

Source§

fn executable(&self) -> bool

Source§

fn rent_epoch(&self) -> Epoch

Source§

impl ReadableAccount for Ref<'_, AccountSharedData>

Implementors§