pub struct NonceState<'a> { /* private fields */ }Expand description
Typed, zero-copy view over an initialized durable-nonce account.
Implementations§
Source§impl<'a> NonceState<'a>
impl<'a> NonceState<'a>
Sourcepub fn from_account_data(data: &'a [u8]) -> Result<NonceState<'a>, ProgramError>
pub fn from_account_data(data: &'a [u8]) -> Result<NonceState<'a>, ProgramError>
Parse an initialized nonce account from raw account data.
Returns Err(InvalidAccountData) if the buffer is too short, the
version is not Current, or the state is not Initialized.
The nonce authority allowed to advance/withdraw.
Sourcepub fn durable_nonce(&self) -> &'a [u8; 32]
pub fn durable_nonce(&self) -> &'a [u8; 32]
The stored durable nonce (a recent blockhash, used as the tx nonce).
Sourcepub fn lamports_per_signature(&self) -> u64
pub fn lamports_per_signature(&self) -> u64
The fee rate (lamports_per_signature) captured with the nonce.
Trait Implementations§
Source§impl<'a> Clone for NonceState<'a>
impl<'a> Clone for NonceState<'a>
Source§fn clone(&self) -> NonceState<'a>
fn clone(&self) -> NonceState<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<'a> Copy for NonceState<'a>
Auto Trait Implementations§
impl<'a> Freeze for NonceState<'a>
impl<'a> RefUnwindSafe for NonceState<'a>
impl<'a> Send for NonceState<'a>
impl<'a> Sync for NonceState<'a>
impl<'a> Unpin for NonceState<'a>
impl<'a> UnsafeUnpin for NonceState<'a>
impl<'a> UnwindSafe for NonceState<'a>
Blanket Implementations§
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