pub struct PodSlotHashes { /* private fields */ }
Expand description
API for querying of the SlotHashes
sysvar by on-chain programs.
Hangs onto the allocated raw buffer from the account data, which can be
queried or accessed directly as a slice of PodSlotHash
.
Implementations§
Source§impl PodSlotHashes
impl PodSlotHashes
Sourcepub fn fetch() -> Result<Self, ProgramError>
pub fn fetch() -> Result<Self, ProgramError>
Fetch all of the raw sysvar data using the sol_get_sysvar
syscall.
Sourcepub fn as_slice(&self) -> Result<&[PodSlotHash], ProgramError>
pub fn as_slice(&self) -> Result<&[PodSlotHash], ProgramError>
Return the SlotHashes
sysvar data as a slice of PodSlotHash
.
Returns a slice of only the initialized sysvar data.
Trait Implementations§
Source§impl Default for PodSlotHashes
impl Default for PodSlotHashes
Source§fn default() -> PodSlotHashes
fn default() -> PodSlotHashes
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for PodSlotHashes
impl RefUnwindSafe for PodSlotHashes
impl Send for PodSlotHashes
impl Sync for PodSlotHashes
impl Unpin for PodSlotHashes
impl UnwindSafe for PodSlotHashes
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