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§

how many more bytes can be stored in this append vec

Creates an appendvec from file without performing sanitize checks or counting the number of accounts

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 iterator for account metadata

Return a vector of 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.

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§

Formats the value using the given formatter. Read more
Executes the destructor for this type. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The alignment of pointer.
The type for initializers.
Initializes a with the given initializer. Read more
Dereferences the given pointer. Read more
Mutably dereferences the given pointer. Read more
Drops the object pointed to by the given pointer. Read more
Should always be Self
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
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