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) -> bool
pub fn unref(&self) -> bool
decrement the ref count return true if the old refcount was already 0. This 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) -> Age
pub fn set_age(&self, value: Age)
sourcepub fn try_exchange_age(&self, next_age: Age, expected_age: Age)
pub fn try_exchange_age(&self, next_age: Age, expected_age: Age)
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> RefUnwindSafe for AccountMapEntryInner<T>
impl<T> Send for AccountMapEntryInner<T>where T: Send,
impl<T> Sync for AccountMapEntryInner<T>where T: Send + Sync,
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