#[account(zero_copy)] (Anchor)
An Anchor attribute applied to account structs to enable zero-copy deserialization, where account data is accessed directly from the underlying byte buffer using repr(C) memory layout rather than Borsh deserialization. Zero-copy accounts use AccountLoader instead of Account and are accessed via load() or load_mut(). Best for large accounts where full deserialization would consume excessive compute units. Fields must be fixed-size types (no Vec, String, or Option).
Sua exploração
0 termos visitados no totalTermos Relacionados
The Anchor macro applied to structs to define on-chain account data layouts. `#[account]` …
Ver termo →A technique for accessing on-chain account data directly from the underlying byte buffer w…
Ver termo →An Anchor account type that provides zero-copy access to large account data without deseri…
Ver termo →