Struct solana_snapshot_etl::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
sourceimpl AppendVec
impl AppendVec
sourcepub fn remaining_bytes(&self) -> u64
pub fn remaining_bytes(&self) -> u64
how many more bytes can be stored in this append vec
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn capacity(&self) -> u64
pub fn new_from_file<P: AsRef<Path>>(path: P, current_len: usize) -> Result<Self>
pub fn new_from_reader<R: Read>(
reader: &mut R,
current_len: usize
) -> Result<Self>
sourcepub fn get_account<'a>(
&'a self,
offset: usize
) -> Option<(StoredAccountMeta<'a>, usize)>
pub fn get_account<'a>(
&'a self,
offset: usize
) -> Option<(StoredAccountMeta<'a>, usize)>
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.
Auto Trait Implementations
impl RefUnwindSafe for AppendVec
impl Send for AppendVec
impl Sync for AppendVec
impl Unpin for AppendVec
impl UnwindSafe for AppendVec
Blanket Implementations
impl<T> AbiExample for T
impl<T> AbiExample for T
default fn example() -> T
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<T> Pointable for T
impl<T> Pointable for T
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more