#[repr(C)]pub struct DelegationRecord {
pub authority: Pubkey,
pub owner: Pubkey,
pub delegation_slot: u64,
pub lamports: u64,
pub commit_frequency_ms: u64,
}Expand description
The Delegation Record stores information such as the authority, the owner and the commit frequency. This is used by the ephemeral validator to update the state of the delegated account.
Fields§
The delegated authority
owner: PubkeyThe original owner of the account
delegation_slot: u64The slot at which the delegation was created
lamports: u64The lamports at the time of delegation or from the last state finalization, stored as lamports can be received even if the account is delegated
commit_frequency_ms: u64The state update frequency in milliseconds
Implementations§
Source§impl DelegationRecord
impl DelegationRecord
pub fn size_with_discriminator() -> usize
Source§impl DelegationRecord
impl DelegationRecord
pub fn to_bytes_with_discriminator( &self, data: &mut [u8], ) -> Result<(), ProgramError>
Source§impl DelegationRecord
impl DelegationRecord
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 DelegationRecord
impl Clone for DelegationRecord
Source§fn clone(&self) -> DelegationRecord
fn clone(&self) -> DelegationRecord
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 DelegationRecord
impl Debug for DelegationRecord
Source§impl PartialEq for DelegationRecord
impl PartialEq for DelegationRecord
impl Copy for DelegationRecord
impl Pod for DelegationRecord
impl StructuralPartialEq for DelegationRecord
Auto Trait Implementations§
impl Freeze for DelegationRecord
impl RefUnwindSafe for DelegationRecord
impl Send for DelegationRecord
impl Sync for DelegationRecord
impl Unpin for DelegationRecord
impl UnsafeUnpin for DelegationRecord
impl UnwindSafe for DelegationRecord
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.