pub struct SysvarCache { /* private fields */ }This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
Implementationsยง
Sourceยงimpl SysvarCache
impl SysvarCache
Sourcepub fn set_sysvar_for_tests<T: SysvarSerialize + SysvarId>(
&mut self,
sysvar: &T,
)
๐Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
pub fn set_sysvar_for_tests<T: SysvarSerialize + SysvarId>( &mut self, sysvar: &T, )
This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
Overwrite a sysvar. For testing purposes only.
pub fn sysvar_id_to_buffer(&self, sysvar_id: &Pubkey) -> &Option<Vec<u8>>
This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
pub fn get_clock(&self) -> Result<Arc<Clock>, InstructionError>
This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
pub fn get_epoch_schedule(&self) -> Result<Arc<EpochSchedule>, InstructionError>
This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
pub fn get_epoch_rewards(&self) -> Result<Arc<EpochRewards>, InstructionError>
This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
pub fn get_rent(&self) -> Result<Arc<Rent>, InstructionError>
This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
pub fn get_last_restart_slot( &self, ) -> Result<Arc<LastRestartSlot>, InstructionError>
This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
pub fn get_stake_history(&self) -> Result<Arc<StakeHistory>, InstructionError>
This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
pub fn get_slot_hashes(&self) -> Result<Arc<SlotHashes>, InstructionError>
This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
pub fn get_fees(&self) -> Result<Arc<Fees>, InstructionError>
pub fn get_recent_blockhashes( &self, ) -> Result<Arc<RecentBlockhashes>, InstructionError>
pub fn fill_missing_entries<F: FnMut(&Pubkey, &mut dyn FnMut(&[u8]))>( &mut self, get_account_data: F, )
This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
pub fn reset(&mut self)
This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
Trait Implementationsยง
Sourceยงimpl Clone for SysvarCache
impl Clone for SysvarCache
Sourceยงfn clone(&self) -> SysvarCache
fn clone(&self) -> SysvarCache
1.0.0 ยท Sourceยงfn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSourceยงimpl Debug for SysvarCache
impl Debug for SysvarCache
Sourceยงimpl Default for SysvarCache
impl Default for SysvarCache
Sourceยงfn default() -> SysvarCache
fn default() -> SysvarCache
Auto Trait Implementationsยง
impl Freeze for SysvarCache
impl RefUnwindSafe for SysvarCache
impl Send for SysvarCache
impl Sync for SysvarCache
impl Unpin for SysvarCache
impl UnsafeUnpin for SysvarCache
impl UnwindSafe for SysvarCache
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
Sourceยงimpl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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>
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