pub struct AccountStorage { /* private fields */ }๐Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Implementationsยง
Sourceยงimpl AccountStorage
impl AccountStorage
Sourcepub fn get_slot_storage_entry(
&self,
slot: Slot,
) -> Option<Arc<AccountStorageEntry>>
๐Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
pub fn get_slot_storage_entry( &self, slot: Slot, ) -> Option<Arc<AccountStorageEntry>>
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.return the append vec for โslotโ if it exists This is only ever called when shrink is not possibly running and there is a max of 1 append vec per slot.
Sourcepub fn initialize(&mut self, all_storages: AccountStorageMap)
๐Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
pub fn initialize(&mut self, all_storages: AccountStorageMap)
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.initialize the storage map to โall_storagesโ
Sourcepub fn get_if(
&self,
predicate: impl Fn(&Slot, &AccountStorageEntry) -> bool,
) -> Box<[(Slot, Arc<AccountStorageEntry>)]>
๐Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
pub fn get_if( &self, predicate: impl Fn(&Slot, &AccountStorageEntry) -> bool, ) -> Box<[(Slot, Arc<AccountStorageEntry>)]>
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Returns the (slot, storage) tuples where predicate returns true
This function is useful when not all storages are desired, as storages are only Arc::cloned if they pass the predicate.
ยงPanics
Panics if shrink is in progress.
Trait Implementationsยง
Sourceยงimpl Debug for AccountStorage
impl Debug for AccountStorage
Sourceยงimpl Default for AccountStorage
impl Default for AccountStorage
Sourceยงfn default() -> AccountStorage
fn default() -> AccountStorage
Returns the โdefault valueโ for a type. Read more
Auto Trait Implementationsยง
impl !Freeze for AccountStorage
impl !RefUnwindSafe for AccountStorage
impl Send for AccountStorage
impl Sync for AccountStorage
impl Unpin for AccountStorage
impl UnwindSafe for AccountStorage
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