pub struct TieredReadableAccount<'accounts_file, M: TieredAccountMeta> {
pub meta: &'accounts_file M,
pub address: &'accounts_file Pubkey,
pub owner: &'accounts_file Pubkey,
pub index: usize,
pub account_block: &'accounts_file [u8],
}
Expand description
The struct that offers read APIs for accessing a TieredAccount.
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: usize
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> TieredReadableAccount<'accounts_file, M>
impl<'accounts_file, M: TieredAccountMeta> TieredReadableAccount<'accounts_file, M>
sourcepub fn write_version(&self) -> Option<StoredMetaWriteVersion>
pub fn write_version(&self) -> Option<StoredMetaWriteVersion>
Returns the write version of the account.
Trait Implementations§
source§impl<'accounts_file, M: Debug + TieredAccountMeta> Debug for TieredReadableAccount<'accounts_file, M>
impl<'accounts_file, M: Debug + TieredAccountMeta> Debug for TieredReadableAccount<'accounts_file, M>
source§impl<'accounts_file, M: PartialEq + TieredAccountMeta> PartialEq for TieredReadableAccount<'accounts_file, M>
impl<'accounts_file, M: PartialEq + TieredAccountMeta> PartialEq for TieredReadableAccount<'accounts_file, M>
source§fn eq(&self, other: &TieredReadableAccount<'accounts_file, M>) -> bool
fn eq(&self, other: &TieredReadableAccount<'accounts_file, M>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<'accounts_file, M: TieredAccountMeta> ReadableAccount for TieredReadableAccount<'accounts_file, M>
impl<'accounts_file, M: TieredAccountMeta> ReadableAccount for TieredReadableAccount<'accounts_file, M>
source§fn executable(&self) -> bool
fn executable(&self) -> bool
Returns true if the data associated to this account is executable.
Temporarily unimplemented!() as program runtime v2 will use a different API for 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. Epoch::MAX will be returned if the account is rent-exempt.
impl<'accounts_file, M: Eq + TieredAccountMeta> Eq for TieredReadableAccount<'accounts_file, M>
impl<'accounts_file, M: TieredAccountMeta> StructuralEq for TieredReadableAccount<'accounts_file, M>
impl<'accounts_file, M: TieredAccountMeta> StructuralPartialEq for TieredReadableAccount<'accounts_file, M>
Auto Trait Implementations§
impl<'accounts_file, M> RefUnwindSafe for TieredReadableAccount<'accounts_file, M>where M: RefUnwindSafe,
impl<'accounts_file, M> Send for TieredReadableAccount<'accounts_file, M>where M: Sync,
impl<'accounts_file, M> Sync for TieredReadableAccount<'accounts_file, M>where M: Sync,
impl<'accounts_file, M> Unpin for TieredReadableAccount<'accounts_file, M>
impl<'accounts_file, M> UnwindSafe for TieredReadableAccount<'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
Mutably borrows from an owned value. Read more
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.