[][src]Struct sixtyfps::VecModel

pub struct VecModel<T> { /* fields omitted */ }

A model backed by an SharedArray

Implementations

impl<T> VecModel<T> where
    T: 'static, 
[src]

pub fn from_slice(slice: &[T]) -> Option<Rc<dyn Model<Data = T> + 'static>> where
    T: Clone
[src]

Allocate a new model from a slice

pub fn push(&self, value: T)[src]

Add a row at the end of the model

pub fn remove(&self, index: usize)[src]

Remove the row at the given index from the model

Trait Implementations

impl<T> Default for VecModel<T> where
    T: Default
[src]

impl<T> From<Vec<T>> for VecModel<T>[src]

impl<T> Model for VecModel<T> where
    T: Clone
[src]

type Data = T

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

Auto Trait Implementations

impl<T> !RefUnwindSafe for VecModel<T>

impl<T> !Send for VecModel<T>

impl<T> !Sync for VecModel<T>

impl<T> Unpin for VecModel<T> where
    T: Unpin

impl<T> !UnwindSafe for VecModel<T>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.