#[repr(C)]pub struct RandomnessAccountData {
pub authority: Pubkey,
pub queue: Pubkey,
pub seed_slothash: [u8; 32],
pub seed_slot: u64,
pub oracle: Pubkey,
pub reveal_slot: u64,
pub value: [u8; 32],
/* private fields */
}
Fields§
§queue: Pubkey
§seed_slothash: [u8; 32]
§seed_slot: u64
§oracle: Pubkey
§reveal_slot: u64
§value: [u8; 32]
Implementations§
source§impl RandomnessAccountData
impl RandomnessAccountData
pub const fn size() -> usize
pub fn get_value(&self, clock: &Clock) -> Result<[u8; 32], OnDemandError>
pub fn is_revealable(&self, clock: &Clock) -> bool
pub fn parse<'info>( data: Ref<'info, &mut [u8]>, ) -> Result<Ref<'info, Self>, OnDemandError>
pub async fn fetch_async( client: &RpcClient, pubkey: Pubkey, ) -> Result<Self, OnDemandError>
Trait Implementations§
source§impl AccountDeserialize for RandomnessAccountData
impl AccountDeserialize for RandomnessAccountData
source§fn try_deserialize(buf: &mut &[u8]) -> Result<Self, Error>
fn try_deserialize(buf: &mut &[u8]) -> Result<Self, Error>
Deserializes previously initialized account data. Should fail for all
uninitialized accounts, where the bytes are zeroed. Implementations
should be unique to a particular account type so that one can never
successfully deserialize the data of one account type into another.
For example, if the SPL token program were to implement this trait,
it should be impossible to deserialize a
Mint
account into a token
Account
.source§fn try_deserialize_unchecked(buf: &mut &[u8]) -> Result<Self, Error>
fn try_deserialize_unchecked(buf: &mut &[u8]) -> Result<Self, Error>
Deserializes account data without checking the account discriminator.
This should only be used on account initialization, when the bytes of
the account are zeroed.
source§impl Clone for RandomnessAccountData
impl Clone for RandomnessAccountData
source§fn clone(&self) -> RandomnessAccountData
fn clone(&self) -> RandomnessAccountData
Returns a copy 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 RandomnessAccountData
impl Debug for RandomnessAccountData
source§impl Discriminator for RandomnessAccountData
impl Discriminator for RandomnessAccountData
const DISCRIMINATOR: [u8; 8] = _
fn discriminator() -> [u8; 8]
impl Copy for RandomnessAccountData
impl Pod for RandomnessAccountData
Auto Trait Implementations§
impl Freeze for RandomnessAccountData
impl RefUnwindSafe for RandomnessAccountData
impl Send for RandomnessAccountData
impl Sync for RandomnessAccountData
impl Unpin for RandomnessAccountData
impl UnwindSafe for RandomnessAccountData
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
§impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
§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
.§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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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