pub trait AccountReader {
    // Required methods
    fn owner(&self) -> &Pubkey;
    fn data(&self) -> &[u8] ;
}
Expand description

Functions should prefer to work with AccountReader where possible, to abstract over AccountInfo and AccountSharedData. That way the functions become usable in the program and in client code.

Required Methods§

source

fn owner(&self) -> &Pubkey

source

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

Implementors§

source§

impl AccountReader for KeyedAccount

source§

impl AccountReader for KeyedAccountSharedData

source§

impl<'info, 'a> AccountReader for AccountInfoRef<'info, 'a>

source§

impl<'info, 'a> AccountReader for AccountInfoRefMut<'info, 'a>

source§

impl<T: ReadableAccount> AccountReader for T