Struct yew_hooks::UseListHandle
source · [−]pub struct UseListHandle<T> { /* private fields */ }Expand description
State handle for the use_list hook.
Implementations
sourceimpl<T> UseListHandle<T>
impl<T> UseListHandle<T>
sourcepub fn remove(&self, index: usize) -> T
pub fn remove(&self, index: usize) -> T
Removes and returns the element at position index within the list, shifting all elements after it to the left.
Panics
Panics if index is out of bounds.
sourcepub fn pop(&self) -> Option<T>
pub fn pop(&self) -> Option<T>
Removes the last element from a vector and returns it, or None if it is empty.
sourcepub fn retain<F>(&self, f: F) where
F: FnMut(&T) -> bool,
pub fn retain<F>(&self, f: F) where
F: FnMut(&T) -> bool,
Retains only the elements specified by the predicate.
sourcepub fn append(&self, other: &mut Vec<T>)
pub fn append(&self, other: &mut Vec<T>)
Moves all the elements of other into Self, leaving other empty.
Trait Implementations
sourceimpl<T> Clone for UseListHandle<T>
impl<T> Clone for UseListHandle<T>
Auto Trait Implementations
impl<T> !RefUnwindSafe for UseListHandle<T>
impl<T> !Send for UseListHandle<T>
impl<T> !Sync for UseListHandle<T>
impl<T> Unpin for UseListHandle<T>
impl<T> !UnwindSafe for UseListHandle<T>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> IntoPropValue<Option<T>> for T
impl<T> IntoPropValue<Option<T>> for T
sourcepub fn into_prop_value(self) -> Option<T>
pub fn into_prop_value(self) -> Option<T>
Convert self to a value of a Properties struct.
sourceimpl<T> IntoPropValue<T> for T
impl<T> IntoPropValue<T> for T
sourcepub fn into_prop_value(self) -> T
pub fn into_prop_value(self) -> T
Convert self to a value of a Properties struct.
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more