[−][src]Struct solana_runtime::accounts_index::AccountsIndex
Fields
account_maps: HashMap<Pubkey, RwLock<Vec<(Fork, T)>>>
roots: HashSet<Fork>
last_root: Fork
Methods
impl<T: Clone> AccountsIndex<T>
[src]
pub fn scan_accounts<F>(&self, ancestors: &HashMap<Fork, usize>, func: F) where
F: FnMut(&Pubkey, (&T, Fork)),
[src]
F: FnMut(&Pubkey, (&T, Fork)),
call func with every pubkey and index visible from a given set of ancestors
pub fn get(
&self,
pubkey: &Pubkey,
ancestors: &HashMap<Fork, usize>
) -> Option<(RwLockReadGuard<Vec<(Fork, T)>>, usize)>
[src]
&self,
pubkey: &Pubkey,
ancestors: &HashMap<Fork, usize>
) -> Option<(RwLockReadGuard<Vec<(Fork, T)>>, usize)>
Get an account
The latest account that appears in ancestors
or roots
is returned.
pub fn get_max_root(roots: &HashSet<Fork>, fork_vec: &[(Fork, T)]) -> Fork
[src]
pub fn insert(
&mut self,
fork: Fork,
pubkey: &Pubkey,
account_info: T,
reclaims: &mut Vec<(Fork, T)>
)
[src]
&mut self,
fork: Fork,
pubkey: &Pubkey,
account_info: T,
reclaims: &mut Vec<(Fork, T)>
)
pub fn update(
&self,
fork: Fork,
pubkey: &Pubkey,
account_info: T,
reclaims: &mut Vec<(Fork, T)>
) -> Option<T>
[src]
&self,
fork: Fork,
pubkey: &Pubkey,
account_info: T,
reclaims: &mut Vec<(Fork, T)>
) -> Option<T>
pub fn add_index(&mut self, fork: Fork, pubkey: &Pubkey, account_info: T)
[src]
pub fn is_purged(&self, fork: Fork) -> bool
[src]
pub fn can_purge(max_root: Fork, fork: Fork) -> bool
[src]
pub fn is_root(&self, fork: Fork) -> bool
[src]
pub fn add_root(&mut self, fork: Fork)
[src]
pub fn cleanup_dead_fork(&mut self, fork: Fork)
[src]
Remove the fork when the storage for the fork is freed Accounts no longer reference this fork.
Trait Implementations
impl<T: Default> Default for AccountsIndex<T>
[src]
fn default() -> AccountsIndex<T>
[src]
impl<T: Debug> Debug for AccountsIndex<T>
[src]
Auto Trait Implementations
impl<T> Unpin for AccountsIndex<T> where
T: Unpin,
T: Unpin,
impl<T> Send for AccountsIndex<T> where
T: Send,
T: Send,
impl<T> Sync for AccountsIndex<T> where
T: Send + Sync,
T: Send + Sync,
impl<T> RefUnwindSafe for AccountsIndex<T>
impl<T> UnwindSafe for AccountsIndex<T>
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Typeable for T where
T: Any,
T: Any,
impl<T> Clear for T where
T: InitializableFromZeroed + ?Sized,
T: InitializableFromZeroed + ?Sized,
fn clear(&mut self)
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> InitializableFromZeroed for T where
T: Default,
T: Default,
unsafe fn initialize(place: *mut T)
impl<T> Erased for T
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
U: TryFrom<T>,