#[repr(u8)]pub enum MutationClass {
ReadOnly = 0,
AppendOnly = 1,
InPlace = 2,
Resizing = 3,
AuthoritySensitive = 4,
Financial = 5,
StateTransition = 6,
}Expand description
Classification of how a layout or segment behaves when mutated.
Enables Hopper to reason about mutation risk, receipt expectations, and policy requirements at the type level rather than guessing from bytes.
Variants§
ReadOnly = 0
No writes allowed. Read-only overlay.
AppendOnly = 1
New entries appended; existing data never modified.
InPlace = 2
Existing fields modified in-place; no size change.
Resizing = 3
Account may be resized (realloc) during mutation.
AuthoritySensitive = 4
Mutation touches authority, owner, or delegate fields.
Financial = 5
Mutation affects balances, supply, or other financial fields.
StateTransition = 6
Mutation changes state machine status or lifecycle stage.
Implementations§
Source§impl MutationClass
impl MutationClass
Sourcepub const fn is_mutating(self) -> bool
pub const fn is_mutating(self) -> bool
Whether this class involves any writes.
Sourcepub const fn requires_snapshot(self) -> bool
pub const fn requires_snapshot(self) -> bool
Whether this class requires a state snapshot for receipt generation.
Whether this class typically needs authority verification.
Trait Implementations§
Source§impl Clone for MutationClass
impl Clone for MutationClass
Source§fn clone(&self) -> MutationClass
fn clone(&self) -> MutationClass
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MutationClass
impl Debug for MutationClass
Source§impl Display for MutationClass
impl Display for MutationClass
Source§impl PartialEq for MutationClass
impl PartialEq for MutationClass
Source§fn eq(&self, other: &MutationClass) -> bool
fn eq(&self, other: &MutationClass) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for MutationClass
impl Eq for MutationClass
impl StructuralPartialEq for MutationClass
Auto Trait Implementations§
impl Freeze for MutationClass
impl RefUnwindSafe for MutationClass
impl Send for MutationClass
impl Sync for MutationClass
impl Unpin for MutationClass
impl UnsafeUnpin for MutationClass
impl UnwindSafe for MutationClass
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more