pub struct AccountMapEntryInner<T> {
pub slot_list: RwLock<SlotList<T>>,
pub meta: AccountMapEntryMeta,
/* private fields */
}
Expand description
one entry in the in-mem accounts index Represents the value for an account key in the in-memory accounts index
Fields§
§slot_list: RwLock<SlotList<T>>
list of slots in which this pubkey was updated Note that ‘clean’ removes outdated entries (ie. older roots) from this slot_list purge_slot() also removes non-rooted slots from this list
meta: AccountMapEntryMeta
synchronization metadata for in-memory state since last flush to disk accounts index
Implementations§
Source§impl<T: IndexValue> AccountMapEntryInner<T>
impl<T: IndexValue> AccountMapEntryInner<T>
pub fn new( slot_list: SlotList<T>, ref_count: RefCount, meta: AccountMapEntryMeta, ) -> Self
pub fn ref_count(&self) -> RefCount
pub fn addref(&self)
Sourcepub fn unref(&self) -> RefCount
pub fn unref(&self) -> RefCount
decrement the ref count return the refcount prior to subtracting 1 0 indicates an under refcounting error in the system.
pub fn dirty(&self) -> bool
pub fn set_dirty(&self, value: bool)
Sourcepub fn clear_dirty(&self) -> bool
pub fn clear_dirty(&self) -> bool
set dirty to false, return true if was dirty
pub fn age(&self) -> u8
pub fn set_age(&self, value: u8)
Sourcepub fn try_exchange_age(&self, next_age: u8, expected_age: u8)
pub fn try_exchange_age(&self, next_age: u8, expected_age: u8)
set age to ‘next_age’ if ‘self.age’ is ‘expected_age’
Trait Implementations§
Source§impl<T: Debug> Debug for AccountMapEntryInner<T>
impl<T: Debug> Debug for AccountMapEntryInner<T>
Source§impl<T: Default> Default for AccountMapEntryInner<T>
impl<T: Default> Default for AccountMapEntryInner<T>
Source§fn default() -> AccountMapEntryInner<T>
fn default() -> AccountMapEntryInner<T>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<T> !Freeze for AccountMapEntryInner<T>
impl<T> RefUnwindSafe for AccountMapEntryInner<T>
impl<T> Send for AccountMapEntryInner<T>where
T: Send,
impl<T> Sync for AccountMapEntryInner<T>
impl<T> Unpin for AccountMapEntryInner<T>where
T: Unpin,
impl<T> UnwindSafe for AccountMapEntryInner<T>
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