struct CurrentAncientAppendVec {
slot_and_append_vec: Option<(Slot, Arc<AccountStorageEntry>)>,
}
Expand description
while combining into ancient append vecs, we need to keep track of the current one that is receiving new data The pattern for callers is:
- this is a mut local
- do some version of create/new
- use it (slot, append_vec, etc.)
- re-create it sometimes
- goto 3 If a caller uses it before initializing it, it will be a runtime unwrap() error, similar to an assert. That condition is an illegal use pattern and is justifiably an assertable condition.
Fields§
§slot_and_append_vec: Option<(Slot, Arc<AccountStorageEntry>)>
Implementations§
source§impl CurrentAncientAppendVec
impl CurrentAncientAppendVec
fn new( slot: Slot, append_vec: Arc<AccountStorageEntry> ) -> CurrentAncientAppendVec
fn create_ancient_append_vec<'a>( &mut self, slot: Slot, db: &'a AccountsDb ) -> ShrinkInProgress<'a>
fn create_if_necessary<'a>( &mut self, slot: Slot, db: &'a AccountsDb ) -> Option<ShrinkInProgress<'a>>
sourcefn append_vec(&self) -> &Arc<AccountStorageEntry>
fn append_vec(&self) -> &Arc<AccountStorageEntry>
note this requires that ‘slot_and_append_vec’ is Some
sourcefn store_ancient_accounts(
&self,
db: &AccountsDb,
accounts_to_store: &AccountsToStore<'_>,
storage_selector: StorageSelector
) -> StoreAccountsTiming
fn store_ancient_accounts( &self, db: &AccountsDb, accounts_to_store: &AccountsToStore<'_>, storage_selector: StorageSelector ) -> StoreAccountsTiming
helper function to cleanup call to ‘store_accounts_frozen’
Trait Implementations§
source§impl Default for CurrentAncientAppendVec
impl Default for CurrentAncientAppendVec
source§fn default() -> CurrentAncientAppendVec
fn default() -> CurrentAncientAppendVec
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl RefUnwindSafe for CurrentAncientAppendVec
impl Send for CurrentAncientAppendVec
impl Sync for CurrentAncientAppendVec
impl Unpin for CurrentAncientAppendVec
impl UnwindSafe for CurrentAncientAppendVec
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