pub struct LoadedProgramsForTxBatch {
pub environments: ProgramRuntimeEnvironments,
/* private fields */
}
Fields§
§environments: ProgramRuntimeEnvironments
Implementations§
source§impl LoadedProgramsForTxBatch
impl LoadedProgramsForTxBatch
pub fn new(slot: Slot, environments: ProgramRuntimeEnvironments) -> Self
sourcepub fn replenish(
&mut self,
key: Pubkey,
entry: Arc<LoadedProgram>
) -> (bool, Arc<LoadedProgram>)
pub fn replenish( &mut self, key: Pubkey, entry: Arc<LoadedProgram> ) -> (bool, Arc<LoadedProgram>)
Refill the cache with a single entry. It’s typically called during transaction loading, and
transaction processing (for program management instructions).
It replaces the existing entry (if any) with the provided entry. The return value contains
true
if an entry existed.
The function also returns the newly inserted value.
pub fn find(&self, key: &Pubkey) -> Option<Arc<LoadedProgram>>
pub fn slot(&self) -> Slot
pub fn set_slot_for_tests(&mut self, slot: Slot)
pub fn merge(&mut self, other: &Self)
Trait Implementations§
source§impl Clone for LoadedProgramsForTxBatch
impl Clone for LoadedProgramsForTxBatch
source§fn clone(&self) -> LoadedProgramsForTxBatch
fn clone(&self) -> LoadedProgramsForTxBatch
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 LoadedProgramsForTxBatch
impl Debug for LoadedProgramsForTxBatch
source§impl Default for LoadedProgramsForTxBatch
impl Default for LoadedProgramsForTxBatch
source§fn default() -> LoadedProgramsForTxBatch
fn default() -> LoadedProgramsForTxBatch
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl RefUnwindSafe for LoadedProgramsForTxBatch
impl Send for LoadedProgramsForTxBatch
impl Sync for LoadedProgramsForTxBatch
impl Unpin for LoadedProgramsForTxBatch
impl UnwindSafe for LoadedProgramsForTxBatch
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