Struct zerovec::varzerovec::VarZeroVecOwned[][src]

pub struct VarZeroVecOwned<T: ?Sized> { /* fields omitted */ }
Expand description

A fully-owned VarZeroVec. This type has no lifetime but has the same internal buffer representation of VarZeroVec, making it cheaply convertible to VarZeroVec and VarZeroVecBorrowed.

Implementations

Construct an empty VarZeroVecOwned

Construct a VarZeroVecOwned from a VarZeroVecBorrowed by cloning the internal data

Construct a VarZeroVecOwned from a list of elements

Obtain a VarZeroVecBorrowed borrowing from the internal buffer

Get the number of elements in this vector

Returns true if the vector contains no elements.

Obtain an iterator over VarZeroVecOwned’s elements

Get one of VarZeroVecOwned’s elements, returning None if the index is out of bounds

Get this VarZeroVecOwned as a borrowed VarZeroVec

If you wish to repeatedly call methods on this VarZeroVecOwned, it is more efficient to perform this conversion first

Empty the vector

Convert this vector to a regular vector of boxed DSTs

Get a reference to the entire backing buffer of this vector

Insert an element at the end of this vector

Insert an element at index idx

Remove the element at index idx

Replace the element at index idx with another

Binary searches a sorted VarZeroVecOwned<T> for the given element. FoGeneralr more information, see the primitive function binary_search.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Performs the conversion.

Performs the conversion.

Performs the conversion.

The returned type after indexing.

Performs the indexing (container[index]) operation. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

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 resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

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.