pub struct ContextAccountDescriptor {Show 14 fields
pub name: &'static str,
pub kind: &'static str,
pub writable: bool,
pub signer: bool,
pub layout_ref: &'static str,
pub policy_ref: &'static str,
pub seeds: &'static [&'static str],
pub optional: bool,
pub lifecycle: AccountLifecycle,
pub payer: &'static str,
pub init_space: u32,
pub has_one: &'static [&'static str],
pub expected_address: &'static str,
pub expected_owner: &'static str,
}Expand description
Schema descriptor for a single account field within a context.
Richer than the basic AccountEntry – captures the full Account DSL
surface including kind, layout, policy, seeds, optionality, and the
Anchor-grade lifecycle flags (init/close/realloc/has_one) that
the Hopper Safety Audit’s ST2 closure requires client generators to
consume.
Fields§
§name: &'static strField name in the struct (e.g. “vault”, “authority”).
kind: &'static strAccount wrapper kind (e.g. “HopperAccount”, “Signer”, “ProgramRef”).
writable: boolWhether the account is writable.
signer: boolWhether the account must be a signer.
layout_ref: &'static strLayout name bound via layout = T, if any (empty string if none).
policy_ref: &'static strPolicy pack name bound via policy = P, if any (empty string if none).
seeds: &'static [&'static str]PDA seed expressions as string representations.
optional: boolWhether the account is optional (may be omitted by the caller).
lifecycle: AccountLifecycleLifecycle role the account plays in this instruction. Clients
use this to synthesize appropriate builder helpers (findPda,
initAccount, closeTo, etc.).
payer: &'static strName of the field whose key pays CPI fees / rent top-up for
init or realloc. Empty if not applicable.
init_space: u32Byte count required for init. None (represented as 0) if
not applicable.
has_one: &'static [&'static str]Fields listed in has_one = ..., required to equal the
corresponding layout field by public key.
expected_address: &'static strAddress the caller must provide, if pinned via address = EXPR
(base58 form for pubkey literals; empty string if not pinned).
expected_owner: &'static strProgram owner the account must be owned by, if pinned via
owner = EXPR. Empty string means “owned by the current program”.
Trait Implementations§
Source§impl Clone for ContextAccountDescriptor
impl Clone for ContextAccountDescriptor
Source§fn clone(&self) -> ContextAccountDescriptor
fn clone(&self) -> ContextAccountDescriptor
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more