#[repr(u8)]pub enum FieldIntent {
Show 20 variants
Balance = 0,
Authority = 1,
Timestamp = 2,
Counter = 3,
Index = 4,
BasisPoints = 5,
Flag = 6,
Address = 7,
Hash = 8,
PDASeed = 9,
Version = 10,
Bump = 11,
Nonce = 12,
Supply = 13,
Limit = 14,
Threshold = 15,
Owner = 16,
Delegate = 17,
Status = 18,
Custom = 255,
}Expand description
Semantic intent of a layout field.
Enables auto-generated UI, receipt explanations, invariant validation, and client SDKs to understand what each field means – not just its type.
Variants§
Balance = 0
Token/SOL balance (lamports or token amount).
Authority = 1
Public key that controls this account.
Timestamp = 2
Unix timestamp (seconds since epoch).
Counter = 3
Monotonic counter (nonce, sequence number).
Index = 4
Array/collection index or offset.
BasisPoints = 5
Basis-point value (e.g. fee rate, slippage tolerance).
Flag = 6
Boolean flag stored as a byte.
Address = 7
Public key reference to another account.
Hash = 8
Hash or fingerprint (layout_id, merkle root, etc.).
PDASeed = 9
PDA seed component stored on-chain.
Version = 10
Layout or schema version number.
Bump = 11
PDA bump seed.
Nonce = 12
Cryptographic nonce (distinct from monotonic counter).
Supply = 13
Token supply or mint total.
Limit = 14
Rate limit, cap, or ceiling value.
Threshold = 15
Multisig or governance threshold.
Owner = 16
Owner identity (distinct from authority – may be non-signer).
Delegate = 17
Delegated authority (can act on behalf of owner).
Status = 18
State machine status / lifecycle stage.
Custom = 255
Application-specific field with no standard semantic.
Implementations§
Source§impl FieldIntent
impl FieldIntent
Sourcepub fn is_monetary(self) -> bool
pub fn is_monetary(self) -> bool
Whether this field represents a monetary amount that should be tracked for conservation invariants.
Sourcepub fn is_identity(self) -> bool
pub fn is_identity(self) -> bool
Whether this field is an identity reference (authority, owner, delegate, or address).
Whether this field is authority-sensitive (mutations require signer verification).
Sourcepub fn is_init_only(self) -> bool
pub fn is_init_only(self) -> bool
Whether this field is immutable after initialization (bump, PDA seed, version seeds).
Sourcepub fn is_governance(self) -> bool
pub fn is_governance(self) -> bool
Whether this field represents a governance or access-control parameter.
Trait Implementations§
Source§impl Clone for FieldIntent
impl Clone for FieldIntent
Source§fn clone(&self) -> FieldIntent
fn clone(&self) -> FieldIntent
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for FieldIntent
impl Debug for FieldIntent
Source§impl Display for FieldIntent
impl Display for FieldIntent
Source§impl PartialEq for FieldIntent
impl PartialEq for FieldIntent
Source§fn eq(&self, other: &FieldIntent) -> bool
fn eq(&self, other: &FieldIntent) -> bool
self and other values to be equal, and is used by ==.