Skip to main content

FieldIntent

Enum FieldIntent 

Source
#[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

Source

pub fn name(self) -> &'static str

Human-readable name for display.

Source

pub fn is_monetary(self) -> bool

Whether this field represents a monetary amount that should be tracked for conservation invariants.

Source

pub fn is_identity(self) -> bool

Whether this field is an identity reference (authority, owner, delegate, or address).

Source

pub fn is_authority_sensitive(self) -> bool

Whether this field is authority-sensitive (mutations require signer verification).

Source

pub fn is_init_only(self) -> bool

Whether this field is immutable after initialization (bump, PDA seed, version seeds).

Source

pub fn is_governance(self) -> bool

Whether this field represents a governance or access-control parameter.

Trait Implementations§

Source§

impl Clone for FieldIntent

Source§

fn clone(&self) -> FieldIntent

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for FieldIntent

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for FieldIntent

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for FieldIntent

Source§

fn eq(&self, other: &FieldIntent) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for FieldIntent

Source§

impl Eq for FieldIntent

Source§

impl StructuralPartialEq for FieldIntent

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.