pub struct HotAccount<'accounts_file, M: TieredAccountMeta> {
pub meta: &'accounts_file M,
pub address: &'accounts_file Pubkey,
pub owner: &'accounts_file Pubkey,
pub index: IndexOffset,
pub account_block: &'accounts_file [u8],
}
Expand description
The struct that offers read APIs for accessing a hot account.
Fields§
§meta: &'accounts_file M
TieredAccountMeta
address: &'accounts_file Pubkey
The address of the account
owner: &'accounts_file Pubkey
The address of the account owner
index: IndexOffset
The index for accessing the account inside its belonging AccountsFile
account_block: &'accounts_file [u8]
The account block that contains this account. Note that this account block may be shared with other accounts.
Implementations§
Source§impl<'accounts_file, M: TieredAccountMeta> HotAccount<'accounts_file, M>
impl<'accounts_file, M: TieredAccountMeta> HotAccount<'accounts_file, M>
Sourcepub fn index(&self) -> IndexOffset
pub fn index(&self) -> IndexOffset
Returns the index to this account in its AccountsFile.
Sourcepub fn stored_size(&self) -> usize
pub fn stored_size(&self) -> usize
Returns the approximate stored size of this account.
Trait Implementations§
Source§impl<'accounts_file, M: Debug + TieredAccountMeta> Debug for HotAccount<'accounts_file, M>
impl<'accounts_file, M: Debug + TieredAccountMeta> Debug for HotAccount<'accounts_file, M>
Source§impl<'accounts_file, M: PartialEq + TieredAccountMeta> PartialEq for HotAccount<'accounts_file, M>
impl<'accounts_file, M: PartialEq + TieredAccountMeta> PartialEq for HotAccount<'accounts_file, M>
Source§fn eq(&self, other: &HotAccount<'accounts_file, M>) -> bool
fn eq(&self, other: &HotAccount<'accounts_file, M>) -> bool
self
and other
values to be equal, and is used by ==
.Source§impl<'accounts_file, M: TieredAccountMeta> ReadableAccount for HotAccount<'accounts_file, M>
impl<'accounts_file, M: TieredAccountMeta> ReadableAccount for HotAccount<'accounts_file, M>
Source§fn executable(&self) -> bool
fn executable(&self) -> bool
Returns true if the data associated to this account is executable.
Source§fn rent_epoch(&self) -> Epoch
fn rent_epoch(&self) -> Epoch
Returns the epoch that this account will next owe rent by parsing the specified account block. RENT_EXEMPT_RENT_EPOCH will be returned if the account is rent-exempt.
For a zero-lamport account, Epoch::default() will be returned to default states of an AccountSharedData.
impl<'accounts_file, M: Eq + TieredAccountMeta> Eq for HotAccount<'accounts_file, M>
impl<'accounts_file, M: TieredAccountMeta> StructuralPartialEq for HotAccount<'accounts_file, M>
Auto Trait Implementations§
impl<'accounts_file, M> Freeze for HotAccount<'accounts_file, M>
impl<'accounts_file, M> RefUnwindSafe for HotAccount<'accounts_file, M>where
M: RefUnwindSafe,
impl<'accounts_file, M> Send for HotAccount<'accounts_file, M>where
M: Sync,
impl<'accounts_file, M> Sync for HotAccount<'accounts_file, M>where
M: Sync,
impl<'accounts_file, M> Unpin for HotAccount<'accounts_file, M>
impl<'accounts_file, M> UnwindSafe for HotAccount<'accounts_file, M>where
M: RefUnwindSafe,
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
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
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>
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>
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