Struct solana_runtime::append_vec::AppendVec
source[−]pub struct AppendVec { /* private fields */ }
Expand description
A thread-safe, file-backed block of memory used to store Account
instances. Append operations
are serialized such that only one thread updates the internal append_lock
at a time. No
restrictions are placed on reading. That is, one may read items from one thread while another
is appending new items.
Implementations
Return account metadata for the account at offset
if its data doesn’t overrun
the internal buffer. Otherwise return None. Also return the offset of the first byte
after the requested data that falls on a 64-byte boundary.
Return account metadata for each account, starting from offset
.
Copy each account metadata, account and hash to the internal buffer.
Return the starting offset of each account metadata.
After each account is appended, the internal current_len
is updated
and will be available to other threads.
pub fn append_account(
&self,
storage_meta: StoredMeta,
account: &AccountSharedData,
hash: Hash
) -> Option<usize>
pub fn append_account(
&self,
storage_meta: StoredMeta,
account: &AccountSharedData,
hash: Hash
) -> Option<usize>
Copy the account metadata, account and hash to the internal buffer.
Return the starting offset of the account metadata.
After the account is appended, the internal current_len
is updated.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for AppendVec
impl UnwindSafe for AppendVec
Blanket Implementations
Mutably borrows from an owned value. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more