pub struct AccountStorageEntry {
pub accounts: AccountsFile,
/* private fields */
}
Expand description
Persistent storage structure holding the accounts
Fields§
§accounts: AccountsFile
storage holding the accounts
Implementations§
source§impl AccountStorageEntry
impl AccountStorageEntry
pub fn new(path: &Path, slot: Slot, id: AppendVecId, file_size: u64) -> Self
pub fn new_existing( slot: Slot, id: AppendVecId, accounts: AccountsFile, num_accounts: usize, ) -> Self
pub fn set_status(&self, status: AccountStorageStatus)
pub fn recycle(&self, slot: Slot, id: AppendVecId)
pub fn status(&self) -> AccountStorageStatus
pub fn count(&self) -> usize
pub fn approx_stored_count(&self) -> usize
pub fn alive_bytes(&self) -> usize
pub fn written_bytes(&self) -> u64
pub fn capacity(&self) -> u64
pub fn has_accounts(&self) -> bool
pub fn slot(&self) -> Slot
pub fn append_vec_id(&self) -> AppendVecId
pub fn flush(&self) -> Result<(), AccountsFileError>
pub fn all_accounts(&self) -> Vec<StoredAccountMeta<'_>>
pub fn get_path(&self) -> PathBuf
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for AccountStorageEntry
impl !RefUnwindSafe for AccountStorageEntry
impl Send for AccountStorageEntry
impl Sync for AccountStorageEntry
impl Unpin for AccountStorageEntry
impl UnwindSafe for AccountStorageEntry
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<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