pub struct SnapshotStateList<T: Clone + 'static> { /* private fields */ }Implementations§
Source§impl<T: Clone + 'static> SnapshotStateList<T>
impl<T: Clone + 'static> SnapshotStateList<T>
pub fn with_runtime<I>(values: I, runtime: RuntimeHandle) -> Selfwhere
I: IntoIterator<Item = T>,
pub fn as_state(&self) -> State<Vec<T>>
pub fn as_mutable_state(&self) -> MutableState<Vec<T>>
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn to_vec(&self) -> Vec<T>
pub fn iter(&self) -> Vec<T>
pub fn get(&self, index: usize) -> T
pub fn get_opt(&self, index: usize) -> Option<T>
pub fn first(&self) -> Option<T>
pub fn last(&self) -> Option<T>
pub fn push(&self, value: T)
pub fn extend<I>(&self, iter: I)where
I: IntoIterator<Item = T>,
pub fn insert(&self, index: usize, value: T)
pub fn set(&self, index: usize, value: T) -> T
pub fn remove(&self, index: usize) -> T
pub fn pop(&self) -> Option<T>
pub fn clear(&self)
pub fn retain<F>(&self, predicate: F)
pub fn replace_with<I>(&self, iter: I)where
I: IntoIterator<Item = T>,
Trait Implementations§
Source§impl<T: Clone + Clone + 'static> Clone for SnapshotStateList<T>
impl<T: Clone + Clone + 'static> Clone for SnapshotStateList<T>
Source§fn clone(&self) -> SnapshotStateList<T>
fn clone(&self) -> SnapshotStateList<T>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<T> Freeze for SnapshotStateList<T>
impl<T> RefUnwindSafe for SnapshotStateList<T>
impl<T> Send for SnapshotStateList<T>
impl<T> Sync for SnapshotStateList<T>
impl<T> Unpin for SnapshotStateList<T>
impl<T> UnwindSafe for SnapshotStateList<T>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more