Struct flatvec::Storage[][src]

pub struct Storage<'a, BackingTy> { /* fields omitted */ }
Expand description

A wrapper over the innards of a FlatVec which exposes mutating operations which cannot corrupt other elements when inserting a new element.

Implementations

Returns a Default slice of BackingTy that will be considered part of this flattened object.

Note that even if you do not use part of this slice, the whole slice will be presented to a FromFlat implementation. This function may be called multiple times in a single IntoFlat implementation or combined with Storage::extend if a flattened object is complex, but it is significantly more efficient to use a single Storage::allocate call where possible.

Reserves capacity for at least len additional BackingTy.

Inserts the BackingTy yielded by iter.

In general, this is ~2x slower than calling allocate when the exact size of the inserted object is known.

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

Performs the conversion.

Performs the conversion.

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.