pub struct SimpleRandomnessV1Account {
pub is_completed: u8,
pub num_bytes: u8,
pub user: Pubkey,
pub escrow: Pubkey,
pub request_slot: u64,
pub callback: Callback,
pub compute_units: u32,
pub priority_fee_micro_lamports: u64,
pub error_message: String,
}
Expand description
Keypair account used as a fallback for listening to randomness requests. These accounts are ephemeral and are intended to be closed upon completion.
Fields§
§is_completed: u8
Flag for determining whether the request has been completed.
num_bytes: u8
§user: Pubkey
§escrow: Pubkey
§request_slot: u64
§callback: Callback
§compute_units: u32
§priority_fee_micro_lamports: u64
§error_message: String
Implementations§
Trait Implementations§
source§impl AccountDeserialize for SimpleRandomnessV1Account
impl AccountDeserialize for SimpleRandomnessV1Account
source§fn try_deserialize(buf: &mut &[u8]) -> Result<Self>
fn try_deserialize(buf: &mut &[u8]) -> Result<Self>
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>
fn try_deserialize_unchecked(buf: &mut &[u8]) -> Result<Self>
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 BorshDeserialize for SimpleRandomnessV1Account
impl BorshDeserialize for SimpleRandomnessV1Account
fn deserialize_reader<R: Read>(reader: &mut R) -> Result<Self, Error>
§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.
§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 SimpleRandomnessV1Account
impl BorshSerialize for SimpleRandomnessV1Account
source§impl Clone for SimpleRandomnessV1Account
impl Clone for SimpleRandomnessV1Account
source§fn clone(&self) -> SimpleRandomnessV1Account
fn clone(&self) -> SimpleRandomnessV1Account
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 SimpleRandomnessV1Account
impl Debug for SimpleRandomnessV1Account
source§impl Default for SimpleRandomnessV1Account
impl Default for SimpleRandomnessV1Account
source§fn default() -> SimpleRandomnessV1Account
fn default() -> SimpleRandomnessV1Account
Returns the “default value” for a type. Read more
source§impl Discriminator for SimpleRandomnessV1Account
impl Discriminator for SimpleRandomnessV1Account
const DISCRIMINATOR: [u8; 8] = _
fn discriminator() -> [u8; 8]
source§impl Space for SimpleRandomnessV1Account
impl Space for SimpleRandomnessV1Account
const INIT_SPACE: usize = 2_498usize
Auto Trait Implementations§
impl RefUnwindSafe for SimpleRandomnessV1Account
impl Send for SimpleRandomnessV1Account
impl Sync for SimpleRandomnessV1Account
impl Unpin for SimpleRandomnessV1Account
impl UnwindSafe for SimpleRandomnessV1Account
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