#[repr(u8)]pub enum AccountMode {
Placeholder = 0,
ReadOnly = 1,
System = 2,
Delegated = 3,
Ephemeral = 4,
Transient = 5,
Closed = 255,
}Expand description
Mutually exclusive modes an account can occupy in the ephemeral rollup (ER).
Variants§
Placeholder = 0
Empty account (not found on chain) used to avoid frequent chain syncs.
ReadOnly = 1
Not writable by users (exists on chain, but not delegated)
System = 2
Internal account used for sysvars, features, and precompiles.
Delegated = 3
Account delegated to the current ER node instance.
Ephemeral = 4
Account that exists only inside the ER.
Transient = 5
Temporary state during mode transitions (e.g. delegated -> readonly).
Closed = 255
Closed account that should be removed from storage.
Implementations§
Source§impl AccountMode
impl AccountMode
Sourcepub fn allows_transition(self, to: Self, from_slot: Slot, to_slot: Slot) -> bool
pub fn allows_transition(self, to: Self, from_slot: Slot, to_slot: Slot) -> bool
Returns whether a privileged lifecycle operation may apply to at
to_slot, including same-mode refreshes and slot ordering.
Only placeholder, read-only, and system accounts permit same-mode refreshes, and those require a newer slot. Slots may never regress.
Returns true for modes whose state is authoritative in this engine.
Trait Implementations§
Source§impl Clone for AccountMode
impl Clone for AccountMode
Source§fn clone(&self) -> AccountMode
fn clone(&self) -> AccountMode
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more