Trait solana_program::program_pack::Pack[][src]

pub trait Pack: Sealed {
    const LEN: usize;
    fn get_packed_len() -> usize { ... }
fn unpack(input: &[u8]) -> Result<Self, ProgramError>
    where
        Self: IsInitialized
, { ... }
fn unpack_unchecked(input: &[u8]) -> Result<Self, ProgramError> { ... }
fn pack(src: Self, dst: &mut [u8]) -> Result<(), ProgramError> { ... } }
Expand description

Safely and efficiently (de)serialize account state

Associated Constants

The length, in bytes, of the packed representation

Provided methods

Get the packed length

Unpack from slice and check if initialized

Unpack from slice without checking if initialized

Pack into slice

Implementors

impl Pack for UserAccountHeader

impl Pack for Mint

impl Pack for Account

impl Pack for Multisig