pub struct BigVec<'data> {
    pub data: &'data mut [u8],
}
Expand description

Contains easy to use utilities for a big vector of Borsh-compatible types, to avoid managing the entire struct on-chain and blow through stack limits.

Fields

data: &'data mut [u8]

Underlying data buffer, pieces of which are serialized

Implementations

Get the length of the vector

Find out if the vector has no contents (as demanded by clippy)

Retain all elements that match the provided function, discard all others

Extracts a slice of the data types

Add new element to the end

Get an iterator for the type provided

Get a mutable iterator for the type provided

Find matching data in the array

Find matching data in the array

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.

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.