AccountDecoder

Trait AccountDecoder 

Source
pub trait AccountDecoder<'a> {
    type AccountType;

    // Required method
    fn decode_account(
        &self,
        account: &'a Account,
    ) -> Option<DecodedAccount<Self::AccountType>>;
}
Expand description

Defines a trait for decoding Solana accounts into structured data types.

AccountDecoder provides a way to convert raw Solana Account data into structured DecodedAccount instances. By implementing this trait, you can define custom decoding logic to interpret account data in a way that suits your application’s requirements.

§Associated Types

  • AccountType: The data type resulting from decoding the account, specific to the application.

Required Associated Types§

Required Methods§

Source

fn decode_account( &self, account: &'a Account, ) -> Option<DecodedAccount<Self::AccountType>>

Implementors§