Attribute Macro anchor_lang::associated

source · []
#[associated]
Expand description

Extends the #[account] attribute to allow one to create associated accounts. This includes a Default implementation, which means all fields in an #[associated] struct must implement Default and an anchor_lang::Bump trait implementation, which allows the account to be used as a program derived address.

Zero Copy Deserialization

Similar to the #[account] attribute one can enable zero copy deserialization by using the zero_copy argument:

#[associated(zero_copy)]

For more, see the account attribute.