[−][src]Struct sixtyfps::VecModel
A model backed by a SharedVector
Implementations
impl<T> VecModel<T> where
T: 'static,
[src]
T: 'static,
pub fn from_slice(slice: &[T]) -> ModelHandle<T> where
T: Clone,
[src]
T: Clone,
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]
T: Default,
impl<T> From<Vec<T, Global>> for VecModel<T>
[src]
impl<T> Model for VecModel<T> where
T: Clone,
[src]
T: Clone,
type Data = T
The model data: A model is a set of row and each row has this data
pub fn row_count(&self) -> usize
[src]
pub fn row_data(&self, row: usize) -> <VecModel<T> as Model>::Data
[src]
pub fn set_row_data(&self, row: usize, data: <VecModel<T> as Model>::Data)
[src]
pub fn attach_peer(&self, peer: ModelPeer)
[src]
pub fn iter(&'a self) -> ModelIterator<'a, Self::Data>ⓘNotable traits for ModelIterator<'a, T>
impl<'a, T> Iterator for ModelIterator<'a, T> type Item = T;
[src]
Notable traits for ModelIterator<'a, T>
impl<'a, T> Iterator for ModelIterator<'a, T> type Item = T;
Auto Trait Implementations
impl<T> !RefUnwindSafe for VecModel<T>
[src]
impl<T> !Send for VecModel<T>
[src]
impl<T> !Sync for VecModel<T>
[src]
impl<T> Unpin for VecModel<T> where
T: Unpin,
[src]
T: Unpin,
impl<T> !UnwindSafe for VecModel<T>
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,