pub struct FeaturesStateV1 { /* private fields */ }Expand description
Frozen on-disk layout of FeaturesState at schema version 1.
A snapshot of the current FeaturesState field layout, kept as a
distinct type — not an alias — so that when the in-memory FeaturesState
gains a field in a future schema bump, FeaturesStateV1’s wire layout stays
frozen and old accounts keep decoding. Field order and types match
FeaturesState exactly, so its borsh encoding is byte-identical to the
pre-envelope format (pinned by the golden tests).
Fields are pub(crate) so the conversions in this module can build it while
external callers still cannot bypass FeaturesState::enable’s validation
by constructing state directly.
Trait Implementations§
Source§impl BorshDeserialize for FeaturesStateV1
impl BorshDeserialize for FeaturesStateV1
fn deserialize_reader<__R: Read>(reader: &mut __R) -> Result<Self, Error>
Source§fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
Deserializes this instance from a given slice of bytes.
Updates the buffer to point at the remaining bytes.
Source§fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_slice(v: &[u8]) -> Result<Self, Error>
Deserialize this instance from a slice of bytes.
fn try_from_reader<R>(reader: &mut R) -> Result<Self, Error>where
R: Read,
Source§impl BorshSerialize for FeaturesStateV1
impl BorshSerialize for FeaturesStateV1
Source§impl Clone for FeaturesStateV1
impl Clone for FeaturesStateV1
Source§fn clone(&self) -> FeaturesStateV1
fn clone(&self) -> FeaturesStateV1
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 FeaturesStateV1
impl Debug for FeaturesStateV1
impl Eq for FeaturesStateV1
Source§impl From<&FeaturesState> for FeaturesStateV1
impl From<&FeaturesState> for FeaturesStateV1
Source§fn from(s: &FeaturesState) -> Self
fn from(s: &FeaturesState) -> Self
Converts to this type from the input type.
Source§impl From<FeaturesState> for FeaturesStateV1
impl From<FeaturesState> for FeaturesStateV1
Source§fn from(s: FeaturesState) -> Self
fn from(s: FeaturesState) -> Self
Converts to this type from the input type.
Source§impl From<FeaturesStateV1> for FeaturesState
impl From<FeaturesStateV1> for FeaturesState
Source§fn from(v: FeaturesStateV1) -> Self
fn from(v: FeaturesStateV1) -> Self
Converts to this type from the input type.
Source§impl PartialEq for FeaturesStateV1
impl PartialEq for FeaturesStateV1
Source§fn eq(&self, other: &FeaturesStateV1) -> bool
fn eq(&self, other: &FeaturesStateV1) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for FeaturesStateV1
Auto Trait Implementations§
impl Freeze for FeaturesStateV1
impl RefUnwindSafe for FeaturesStateV1
impl Send for FeaturesStateV1
impl Sync for FeaturesStateV1
impl Unpin for FeaturesStateV1
impl UnsafeUnpin for FeaturesStateV1
impl UnwindSafe for FeaturesStateV1
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