pub enum PreAllocatedAccountMapEntry<T: IndexValue> {
Entry(Arc<AccountMapEntryInner<T>>),
Raw((Slot, T)),
}
Expand description
can be used to pre-allocate structures for insertion into accounts index outside of lock
Variants§
Entry(Arc<AccountMapEntryInner<T>>)
Raw((Slot, T))
Implementations§
source§impl<T: IndexValue> PreAllocatedAccountMapEntry<T>
impl<T: IndexValue> PreAllocatedAccountMapEntry<T>
sourcepub fn new(
slot: Slot,
account_info: T,
storage: &Arc<BucketMapHolder<T>>,
store_raw: bool
) -> PreAllocatedAccountMapEntry<T>
pub fn new( slot: Slot, account_info: T, storage: &Arc<BucketMapHolder<T>>, store_raw: bool ) -> PreAllocatedAccountMapEntry<T>
create an entry that is equivalent to this process:
- new empty (refcount=0, slot_list={})
- update(slot, account_info) This code is called when the first entry [ie. (slot,account_info)] for a pubkey is inserted into the index.
pub fn into_account_map_entry( self, storage: &Arc<BucketMapHolder<T>> ) -> Arc<AccountMapEntryInner<T>>
Trait Implementations§
source§impl<T: IndexValue> From<PreAllocatedAccountMapEntry<T>> for (Slot, T)
impl<T: IndexValue> From<PreAllocatedAccountMapEntry<T>> for (Slot, T)
source§fn from(source: PreAllocatedAccountMapEntry<T>) -> (Slot, T)
fn from(source: PreAllocatedAccountMapEntry<T>) -> (Slot, T)
Converts to this type from the input type.