pub enum StoredAccountMeta<'storage> {
AppendVec(AppendVecStoredAccountMeta<'storage>),
Hot(TieredReadableAccount<'storage, HotAccountMeta>),
}
Expand description
References to account data stored elsewhere. Getting an Account
requires cloning
(see StoredAccountMeta::clone_account()
).
Variants§
AppendVec(AppendVecStoredAccountMeta<'storage>)
Hot(TieredReadableAccount<'storage, HotAccountMeta>)
Implementations§
source§impl<'storage> StoredAccountMeta<'storage>
impl<'storage> StoredAccountMeta<'storage>
pub fn pubkey(&self) -> &'storage Pubkey
pub fn hash(&self) -> &'storage AccountHash
pub fn stored_size(&self) -> usize
pub fn offset(&self) -> usize
pub fn data(&self) -> &'storage [u8] ⓘ
pub fn data_len(&self) -> u64
pub fn write_version(&self) -> StoredMetaWriteVersion
pub fn meta(&self) -> &StoredMeta
pub fn set_meta(&mut self, meta: &'storage StoredMeta)
Trait Implementations§
source§impl<'storage> Debug for StoredAccountMeta<'storage>
impl<'storage> Debug for StoredAccountMeta<'storage>
source§impl<'storage> PartialEq for StoredAccountMeta<'storage>
impl<'storage> PartialEq for StoredAccountMeta<'storage>
source§impl<'storage> ReadableAccount for StoredAccountMeta<'storage>
impl<'storage> ReadableAccount for StoredAccountMeta<'storage>
source§impl<'a> StorableAccounts<'a, StoredAccountMeta<'a>> for (Slot, &'a [&'a StoredAccountMeta<'a>])
impl<'a> StorableAccounts<'a, StoredAccountMeta<'a>> for (Slot, &'a [&'a StoredAccountMeta<'a>])
source§fn account(&self, index: usize) -> &StoredAccountMeta<'a>
fn account(&self, index: usize) -> &StoredAccountMeta<'a>
account at ‘index’
fn slot(&self, _index: usize) -> Slot
source§fn target_slot(&self) -> Slot
fn target_slot(&self) -> Slot
slot that all accounts are to be written to
source§fn has_hash_and_write_version(&self) -> bool
fn has_hash_and_write_version(&self) -> bool
true iff the impl can provide hash and write_version
Otherwise, hash and write_version have to be provided separately to store functions.
source§fn hash(&self, index: usize) -> &AccountHash
fn hash(&self, index: usize) -> &AccountHash
return hash for account at ‘index’
Should only be called if ‘has_hash_and_write_version’ = true
source§fn write_version(&self, index: usize) -> u64
fn write_version(&self, index: usize) -> u64
return write_version for account at ‘index’
Should only be called if ‘has_hash_and_write_version’ = true
source§fn account_default_if_zero_lamport(&self, index: usize) -> Option<&T>
fn account_default_if_zero_lamport(&self, index: usize) -> Option<&T>
None if account is zero lamports
source§fn contains_multiple_slots(&self) -> bool
fn contains_multiple_slots(&self) -> bool
are there accounts from multiple slots
only used for an assert
source§impl<'a> StorableAccounts<'a, StoredAccountMeta<'a>> for (Slot, &'a [&'a StoredAccountMeta<'a>], Slot)
impl<'a> StorableAccounts<'a, StoredAccountMeta<'a>> for (Slot, &'a [&'a StoredAccountMeta<'a>], Slot)
this tuple contains a single different source slot that applies to all accounts accounts are StoredAccountMeta
source§fn account(&self, index: usize) -> &StoredAccountMeta<'a>
fn account(&self, index: usize) -> &StoredAccountMeta<'a>
account at ‘index’
fn slot(&self, _index: usize) -> Slot
source§fn target_slot(&self) -> Slot
fn target_slot(&self) -> Slot
slot that all accounts are to be written to
source§fn has_hash_and_write_version(&self) -> bool
fn has_hash_and_write_version(&self) -> bool
true iff the impl can provide hash and write_version
Otherwise, hash and write_version have to be provided separately to store functions.
source§fn hash(&self, index: usize) -> &AccountHash
fn hash(&self, index: usize) -> &AccountHash
return hash for account at ‘index’
Should only be called if ‘has_hash_and_write_version’ = true
source§fn write_version(&self, index: usize) -> u64
fn write_version(&self, index: usize) -> u64
return write_version for account at ‘index’
Should only be called if ‘has_hash_and_write_version’ = true
source§fn account_default_if_zero_lamport(&self, index: usize) -> Option<&T>
fn account_default_if_zero_lamport(&self, index: usize) -> Option<&T>
None if account is zero lamports
source§fn contains_multiple_slots(&self) -> bool
fn contains_multiple_slots(&self) -> bool
are there accounts from multiple slots
only used for an assert
source§impl<'a> StorableAccounts<'a, StoredAccountMeta<'a>> for StorableAccountsBySlot<'a>
impl<'a> StorableAccounts<'a, StoredAccountMeta<'a>> for StorableAccountsBySlot<'a>
source§fn account(&self, index: usize) -> &StoredAccountMeta<'a>
fn account(&self, index: usize) -> &StoredAccountMeta<'a>
account at ‘index’
fn slot(&self, index: usize) -> Slot
source§fn target_slot(&self) -> Slot
fn target_slot(&self) -> Slot
slot that all accounts are to be written to
source§fn contains_multiple_slots(&self) -> bool
fn contains_multiple_slots(&self) -> bool
are there accounts from multiple slots
only used for an assert
source§fn has_hash_and_write_version(&self) -> bool
fn has_hash_and_write_version(&self) -> bool
true iff the impl can provide hash and write_version
Otherwise, hash and write_version have to be provided separately to store functions.
source§fn hash(&self, index: usize) -> &AccountHash
fn hash(&self, index: usize) -> &AccountHash
return hash for account at ‘index’
Should only be called if ‘has_hash_and_write_version’ = true
source§fn write_version(&self, index: usize) -> u64
fn write_version(&self, index: usize) -> u64
return write_version for account at ‘index’
Should only be called if ‘has_hash_and_write_version’ = true
source§impl<'a> ZeroLamport for StoredAccountMeta<'a>
impl<'a> ZeroLamport for StoredAccountMeta<'a>
fn is_zero_lamport(&self) -> bool
impl<'storage> Eq for StoredAccountMeta<'storage>
impl<'storage> StructuralPartialEq for StoredAccountMeta<'storage>
Auto Trait Implementations§
impl<'storage> Freeze for StoredAccountMeta<'storage>
impl<'storage> RefUnwindSafe for StoredAccountMeta<'storage>
impl<'storage> Send for StoredAccountMeta<'storage>
impl<'storage> Sync for StoredAccountMeta<'storage>
impl<'storage> Unpin for StoredAccountMeta<'storage>
impl<'storage> UnwindSafe for StoredAccountMeta<'storage>
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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