#[repr(C)]pub struct CommitRecord {
pub identity: Pubkey,
pub account: Pubkey,
pub nonce: u64,
pub lamports: u64,
}Expand description
The Commit State Record
Fields§
§identity: PubkeyThe identity committing the state
account: PubkeyThe account for which the state is committed
nonce: u64The external nonce of the commit. This is used to enforce sequential commits
lamports: u64The account committed lamports
Implementations§
Source§impl CommitRecord
impl CommitRecord
pub fn size_with_discriminator() -> usize
Source§impl CommitRecord
impl CommitRecord
pub fn to_bytes_with_discriminator( &self, data: &mut [u8], ) -> Result<(), ProgramError>
Source§impl CommitRecord
impl CommitRecord
pub fn try_from_bytes_with_discriminator( data: &[u8], ) -> Result<&Self, ProgramError>
pub fn try_from_bytes_with_discriminator_mut( data: &mut [u8], ) -> Result<&mut Self, ProgramError>
Trait Implementations§
Source§impl Clone for CommitRecord
impl Clone for CommitRecord
Source§fn clone(&self) -> CommitRecord
fn clone(&self) -> CommitRecord
Returns a duplicate of the value. Read more
1.0.0 · 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 CommitRecord
impl Debug for CommitRecord
Source§impl PartialEq for CommitRecord
impl PartialEq for CommitRecord
impl Copy for CommitRecord
impl Pod for CommitRecord
impl StructuralPartialEq for CommitRecord
Auto Trait Implementations§
impl Freeze for CommitRecord
impl RefUnwindSafe for CommitRecord
impl Send for CommitRecord
impl Sync for CommitRecord
impl Unpin for CommitRecord
impl UnsafeUnpin for CommitRecord
impl UnwindSafe for CommitRecord
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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
Source§impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
Source§type Bits = T
type Bits = T
Self must have the same layout as the specified Bits except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern.Source§fn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
If this function returns true, then it must be valid to reinterpret
bits
as &Self.Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> PodView for Twhere
T: Pod,
impl<T> PodView for Twhere
T: Pod,
Source§const SPACE: usize = const SPACE: usize = core::mem::size_of::<T>();
const SPACE: usize = const SPACE: usize = core::mem::size_of::<T>();
The exact size of the POD type in bytes. Read more
const ALIGN: usize = const ALIGN: usize = core::mem::align_of::<T>();
Source§fn try_copy_to(&self, buffer: &mut [u8]) -> Result<(), ProgramError>
fn try_copy_to(&self, buffer: &mut [u8]) -> Result<(), ProgramError>
Copy the raw bytes of Self into the given mutable buffer. Read more
Source§fn try_view_from(buffer: &[u8]) -> Result<&T, ProgramError>
fn try_view_from(buffer: &[u8]) -> Result<&T, ProgramError>
Source§fn try_view_from_mut(buffer: &mut [u8]) -> Result<&mut T, ProgramError>
fn try_view_from_mut(buffer: &mut [u8]) -> Result<&mut T, ProgramError>
Mutable version of try_view_from.