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<U: DiskIndexValue + From<T> + Into<T>>(
slot: Slot,
account_info: T,
storage: &Arc<BucketMapHolder<T, U>>,
store_raw: bool,
) -> PreAllocatedAccountMapEntry<T>
pub fn new<U: DiskIndexValue + From<T> + Into<T>>( slot: Slot, account_info: T, storage: &Arc<BucketMapHolder<T, U>>, 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<U: DiskIndexValue + From<T> + Into<T>>( self, storage: &Arc<BucketMapHolder<T, U>>, ) -> 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.
Source§impl<T: IndexValue> ZeroLamport for PreAllocatedAccountMapEntry<T>
impl<T: IndexValue> ZeroLamport for PreAllocatedAccountMapEntry<T>
fn is_zero_lamport(&self) -> bool
Auto Trait Implementations§
impl<T> Freeze for PreAllocatedAccountMapEntry<T>where
T: Freeze,
impl<T> RefUnwindSafe for PreAllocatedAccountMapEntry<T>where
T: RefUnwindSafe,
impl<T> Send for PreAllocatedAccountMapEntry<T>
impl<T> Sync for PreAllocatedAccountMapEntry<T>
impl<T> Unpin for PreAllocatedAccountMapEntry<T>where
T: Unpin,
impl<T> UnwindSafe for PreAllocatedAccountMapEntry<T>where
T: UnwindSafe,
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