[][src]Struct solana_runtime::accounts_index::AccountsIndex

pub struct AccountsIndex<T> {
    pub account_maps: HashMap<Pubkey, Vec<(Fork, T)>>,
    pub roots: HashSet<Fork>,
    pub last_root: Fork,
}

Fields

account_maps: HashMap<Pubkey, Vec<(Fork, T)>>roots: HashSet<Fork>last_root: Fork

Methods

impl<T: Clone> AccountsIndex<T>[src]

pub fn get(
    &self,
    pubkey: &Pubkey,
    ancestors: &HashMap<Fork, usize>
) -> Option<(&T, Fork)>
[src]

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]

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]

impl<T: Debug> Debug for AccountsIndex<T>[src]

Auto Trait Implementations

impl<T> Send for AccountsIndex<T> where
    T: Send

impl<T> Unpin for AccountsIndex<T> where
    T: Unpin

impl<T> Sync for AccountsIndex<T> where
    T: Sync

impl<T> UnwindSafe for AccountsIndex<T> where
    T: RefUnwindSafe + UnwindSafe

impl<T> RefUnwindSafe for AccountsIndex<T> where
    T: RefUnwindSafe

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Typeable for T where
    T: Any

fn get_type(&self) -> TypeId

Get the TypeId of this object.

impl<T> Clear for T where
    T: InitializableFromZeroed + ?Sized

impl<T> InitializableFromZeroed for T where
    T: Default

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> Erased for T

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Err = <U as TryFrom<T>>::Err