solana_accounts_db::inline_spl_token

Trait GenericTokenAccount

source
pub trait GenericTokenAccount {
    // Required method
    fn valid_account_data(account_data: &[u8]) -> bool;

    // Provided methods
    fn unpack_account_owner_unchecked(account_data: &[u8]) -> &Pubkey { ... }
    fn unpack_account_mint_unchecked(account_data: &[u8]) -> &Pubkey { ... }
    fn unpack_pubkey_unchecked(account_data: &[u8], offset: usize) -> &Pubkey { ... }
    fn unpack_account_owner(account_data: &[u8]) -> Option<&Pubkey> { ... }
    fn unpack_account_mint(account_data: &[u8]) -> Option<&Pubkey> { ... }
}

Required Methods§

source

fn valid_account_data(account_data: &[u8]) -> bool

Provided Methods§

source

fn unpack_account_owner_unchecked(account_data: &[u8]) -> &Pubkey

source

fn unpack_account_mint_unchecked(account_data: &[u8]) -> &Pubkey

source

fn unpack_pubkey_unchecked(account_data: &[u8], offset: usize) -> &Pubkey

source

fn unpack_account_owner(account_data: &[u8]) -> Option<&Pubkey>

source

fn unpack_account_mint(account_data: &[u8]) -> Option<&Pubkey>

Object Safety§

This trait is not object safe.

Implementors§

source§

impl GenericTokenAccount for solana_accounts_db::inline_spl_token_2022::Account

source§

impl GenericTokenAccount for solana_accounts_db::inline_spl_token::Account