Module anchor_lang::accounts::boxed

source ·
Expand description

Box type to save stack space.

Sometimes accounts are too large for the stack, leading to stack violations.

Boxing the account can help.

Example

#[derive(Accounts)]
pub struct Example {
    pub my_acc: Box<Account<'info, MyData>>
}