logo
pub struct VecModel<T> { /* private fields */ }
Expand description

A model backed by a Vec<T>

Implementations

Allocate a new model from a slice

Add a row at the end of the model

Inserts a row at position index. All rows after that are shifted. This function panics if index is > row_count().

Remove the row at the given index from the model

Trait Implementations

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

Performs the conversion.

The model data: A model is a set of row and each row has this data

The amount of row in the model

Returns the data for a particular row. This function should be called with row < row_count().

Sets the data for a particular row. Read more

The implementation should return a reference to its ModelNotify field.

Return something that can be downcast’ed (typically self) Read more

👎 Deprecated:

Re-implement model_tracker instead of this function

The implementation should forward to ModelNotify::attach

Returns an iterator visiting all elements of the model.

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.