pub struct LoadedPrograms { /* private fields */ }
Implementations§
Source§impl LoadedPrograms
impl LoadedPrograms
Sourcepub fn insert_entry(
&mut self,
key: Pubkey,
entry: LoadedProgram,
) -> LoadedProgramEntry
pub fn insert_entry( &mut self, key: Pubkey, entry: LoadedProgram, ) -> LoadedProgramEntry
Inserts a single entry
Sourcepub fn prune<F: ForkGraph>(&mut self, fork_graph: &F, new_root: Slot)
pub fn prune<F: ForkGraph>(&mut self, fork_graph: &F, new_root: Slot)
Before rerooting the blockstore this removes all programs of orphan forks
Sourcepub fn extract<S: WorkingSlot>(
&self,
working_slot: &S,
keys: impl Iterator<Item = Pubkey>,
) -> (HashMap<Pubkey, Arc<LoadedProgram>>, Vec<Pubkey>)
pub fn extract<S: WorkingSlot>( &self, working_slot: &S, keys: impl Iterator<Item = Pubkey>, ) -> (HashMap<Pubkey, Arc<LoadedProgram>>, Vec<Pubkey>)
Extracts a subset of the programs relevant to a transaction batch and returns which program accounts the accounts DB needs to load.
Sourcepub fn sort_and_evict(&mut self)
pub fn sort_and_evict(&mut self)
Evicts programs which were used infrequently
Sourcepub fn remove_entries(&mut self, _key: impl Iterator<Item = Pubkey>)
pub fn remove_entries(&mut self, _key: impl Iterator<Item = Pubkey>)
Removes the entries at the given keys, if they exist
Trait Implementations§
Source§impl AbiExample for LoadedPrograms
impl AbiExample for LoadedPrograms
Source§impl Debug for LoadedPrograms
impl Debug for LoadedPrograms
Source§impl Default for LoadedPrograms
impl Default for LoadedPrograms
Source§fn default() -> LoadedPrograms
fn default() -> LoadedPrograms
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for LoadedPrograms
impl RefUnwindSafe for LoadedPrograms
impl Send for LoadedPrograms
impl Sync for LoadedPrograms
impl Unpin for LoadedPrograms
impl UnwindSafe for LoadedPrograms
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
Converts
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>
Converts
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