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§
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>
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.