#[repr(u16)]pub enum AccountIndexFormat {
AddressAndOffset = 0,
}
Expand description
The index format of a tiered accounts file.
Variants§
AddressAndOffset = 0
This format optimizes the storage size by storing only account addresses and offsets. It skips storing the size of account data by storing account block entries and index block entries in the same order.
Implementations§
source§impl AccountIndexFormat
impl AccountIndexFormat
sourcepub fn write_index_block(
&self,
file: &TieredStorageFile,
index_entries: &[AccountIndexWriterEntry<'_>]
) -> TieredStorageResult<usize>
pub fn write_index_block( &self, file: &TieredStorageFile, index_entries: &[AccountIndexWriterEntry<'_>] ) -> TieredStorageResult<usize>
Persists the specified index_entries to the specified file and returns the total number of bytes written.
sourcepub fn get_account_address<'a>(
&self,
map: &'a Mmap,
footer: &TieredStorageFooter,
index: usize
) -> TieredStorageResult<&'a Pubkey>
pub fn get_account_address<'a>( &self, map: &'a Mmap, footer: &TieredStorageFooter, index: usize ) -> TieredStorageResult<&'a Pubkey>
Returns the address of the account given the specified index.
sourcepub fn get_account_block_offset(
&self,
map: &Mmap,
footer: &TieredStorageFooter,
index: usize
) -> TieredStorageResult<u64>
pub fn get_account_block_offset( &self, map: &Mmap, footer: &TieredStorageFooter, index: usize ) -> TieredStorageResult<u64>
Returns the offset to the account block that contains the account associated with the specified index to the index block.
sourcepub fn entry_size(&self) -> usize
pub fn entry_size(&self) -> usize
Returns the size of one index entry.
Trait Implementations§
source§impl Clone for AccountIndexFormat
impl Clone for AccountIndexFormat
source§fn clone(&self) -> AccountIndexFormat
fn clone(&self) -> AccountIndexFormat
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for AccountIndexFormat
impl Debug for AccountIndexFormat
source§impl Default for AccountIndexFormat
impl Default for AccountIndexFormat
source§fn default() -> AccountIndexFormat
fn default() -> AccountIndexFormat
Returns the “default value” for a type. Read more
source§impl From<AccountIndexFormat> for u16
impl From<AccountIndexFormat> for u16
source§fn from(enum_value: AccountIndexFormat) -> Self
fn from(enum_value: AccountIndexFormat) -> Self
Converts to this type from the input type.
source§impl Hash for AccountIndexFormat
impl Hash for AccountIndexFormat
source§impl PartialEq for AccountIndexFormat
impl PartialEq for AccountIndexFormat
source§fn eq(&self, other: &AccountIndexFormat) -> bool
fn eq(&self, other: &AccountIndexFormat) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl TryFrom<u16> for AccountIndexFormat
impl TryFrom<u16> for AccountIndexFormat
§type Error = TryFromPrimitiveError<AccountIndexFormat>
type Error = TryFromPrimitiveError<AccountIndexFormat>
The type returned in the event of a conversion error.
impl Copy for AccountIndexFormat
impl Eq for AccountIndexFormat
impl StructuralEq for AccountIndexFormat
impl StructuralPartialEq for AccountIndexFormat
Auto Trait Implementations§
impl RefUnwindSafe for AccountIndexFormat
impl Send for AccountIndexFormat
impl Sync for AccountIndexFormat
impl Unpin for AccountIndexFormat
impl UnwindSafe for AccountIndexFormat
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 Q
impl<Q, K> Equivalent<K> for Q
§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 Q
impl<Q, K> Equivalent<K> for Q
§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 Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.