pub struct DelegationMetadata {
pub last_update_nonce: u64,
pub is_undelegatable: bool,
pub seeds: Vec<Vec<u8>>,
pub rent_payer: Pubkey,
}Expand description
The Delegated Metadata includes Account Seeds, max delegation time, seeds and other meta information about the delegated account.
- Everything necessary at cloning time is instead stored in the delegation record.
Fields§
§last_update_nonce: u64The last nonce account had during delegation update Deprecated: The last slot at which the delegation was updated
is_undelegatable: boolWhether the account can be undelegated or not
seeds: Vec<Vec<u8>>The seeds of the account, used to reopen it on undelegation
rent_payer: PubkeyThe account that paid the rent for the delegation PDAs
Implementations§
Source§impl DelegationMetadata
impl DelegationMetadata
pub fn serialized_size(&self) -> usize
Source§impl DelegationMetadata
impl DelegationMetadata
pub fn to_bytes_with_discriminator<W: Write>( &self, writer: &mut W, ) -> Result<(), ProgramError>
Source§impl DelegationMetadata
impl DelegationMetadata
pub fn try_from_bytes_with_discriminator( data: &[u8], ) -> Result<Self, ProgramError>
Trait Implementations§
Source§impl BorshDeserialize for DelegationMetadata
impl BorshDeserialize for DelegationMetadata
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 DelegationMetadata
impl BorshSerialize for DelegationMetadata
Source§impl Debug for DelegationMetadata
impl Debug for DelegationMetadata
Source§impl PartialEq for DelegationMetadata
impl PartialEq for DelegationMetadata
impl StructuralPartialEq for DelegationMetadata
Auto Trait Implementations§
impl Freeze for DelegationMetadata
impl RefUnwindSafe for DelegationMetadata
impl Send for DelegationMetadata
impl Sync for DelegationMetadata
impl Unpin for DelegationMetadata
impl UnsafeUnpin for DelegationMetadata
impl UnwindSafe for DelegationMetadata
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<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 more