Trait fetsig::MutableVecExt

source ·
pub trait MutableVecExt<A> {
Show 30 methods // Required methods fn map_vec<F, U>(&self, f: F) -> U where F: FnOnce(&[A]) -> U; fn map_vec_mut<F, U>(&self, f: F) -> U where F: FnOnce(&mut MutableVecLockMut<'_, A>) -> U; fn inspect(&self, f: impl FnOnce(&[A])); fn inspect_mut(&self, f: impl FnOnce(&mut MutableVecLockMut<'_, A>)); fn find_inspect_mut<P, F>(&self, predicate: P, f: F) -> Option<bool> where A: Copy, P: FnMut(&A) -> bool, F: FnOnce(&mut A) -> bool; fn find_inspect_mut_cloned<P, F>(&self, predicate: P, f: F) -> Option<bool> where A: Clone, P: FnMut(&A) -> bool, F: FnOnce(&mut A) -> bool; fn map<F, U>(&self, f: F) -> Vec<U> where F: FnMut(&A) -> U; fn enumerate_map<F, U>(&self, f: F) -> Vec<U> where F: FnMut(usize, &A) -> U; fn filter<P>(&self, p: P) -> Vec<A> where A: Copy, P: FnMut(&A) -> bool; fn filter_cloned<P>(&self, p: P) -> Vec<A> where A: Clone, P: FnMut(&A) -> bool; fn filter_map<P, U>(&self, p: P) -> Vec<U> where P: FnMut(&A) -> Option<U>; fn find<P>(&self, p: P) -> Option<A> where A: Copy, P: FnMut(&A) -> bool; fn find_cloned<P>(&self, p: P) -> Option<A> where A: Clone, P: FnMut(&A) -> bool; fn find_map<P, U>(&self, p: P) -> Option<U> where P: FnMut(&A) -> Option<U>; fn find_set<P>(&self, p: P, item: A) -> bool where A: Copy, P: FnMut(&A) -> bool; fn find_set_cloned<P>(&self, p: P, item: A) -> bool where A: Clone, P: FnMut(&A) -> bool; fn find_set_or_add<P>(&self, p: P, item: A) where A: Copy, P: FnMut(&A) -> bool; fn find_set_or_add_cloned<P>(&self, p: P, item: A) where A: Clone, P: FnMut(&A) -> bool; fn find_remove<P>(&self, p: P) -> bool where A: Copy, P: FnMut(&A) -> bool; fn find_remove_cloned<P>(&self, p: P) -> bool where A: Clone, P: FnMut(&A) -> bool; fn extend(&self, source: impl IntoIterator<Item = A>) where A: Copy; fn extend_cloned(&self, source: impl IntoIterator<Item = A>) where A: Clone; fn replace<P>(&self, what: P, with: impl IntoIterator<Item = A>) where A: Copy, P: FnMut(&A) -> bool; fn replace_cloned<P>(&self, what: P, with: impl IntoIterator<Item = A>) where A: Clone, P: FnMut(&A) -> bool; fn replace_or_extend_keyed<F, K>( &self, f: F, source: impl IntoIterator<Item = A>, ) -> bool where A: Copy, F: FnMut(&A) -> K, K: Eq + Hash; fn replace_or_extend_keyed_cloned<F, K>( &self, f: F, source: impl IntoIterator<Item = A>, ) -> bool where A: Clone, F: FnMut(&A) -> K, K: Eq + Hash; fn signal_vec_filter<P>(&self, p: P) -> Filter<MutableSignalVec<A>, P> where A: Copy, P: FnMut(&A) -> bool; fn signal_vec_filter_cloned<P>( &self, p: P, ) -> Filter<MutableSignalVec<A>, P> where A: Clone, P: FnMut(&A) -> bool; fn signal_vec_filter_signal<P, S>( &self, p: P, ) -> FilterSignalCloned<MutableSignalVec<A>, S, P> where A: Copy, P: FnMut(&A) -> S, S: Signal<Item = bool>; fn signal_vec_filter_signal_cloned<P, S>( &self, p: P, ) -> FilterSignalCloned<MutableSignalVec<A>, S, P> where A: Clone, P: FnMut(&A) -> S, S: Signal<Item = bool>;
}

Required Methods§

source

fn map_vec<F, U>(&self, f: F) -> U
where F: FnOnce(&[A]) -> U,

source

fn map_vec_mut<F, U>(&self, f: F) -> U
where F: FnOnce(&mut MutableVecLockMut<'_, A>) -> U,

source

fn inspect(&self, f: impl FnOnce(&[A]))

source

fn inspect_mut(&self, f: impl FnOnce(&mut MutableVecLockMut<'_, A>))

source

fn find_inspect_mut<P, F>(&self, predicate: P, f: F) -> Option<bool>
where A: Copy, P: FnMut(&A) -> bool, F: FnOnce(&mut A) -> bool,

source

fn find_inspect_mut_cloned<P, F>(&self, predicate: P, f: F) -> Option<bool>
where A: Clone, P: FnMut(&A) -> bool, F: FnOnce(&mut A) -> bool,

source

fn map<F, U>(&self, f: F) -> Vec<U>
where F: FnMut(&A) -> U,

source

fn enumerate_map<F, U>(&self, f: F) -> Vec<U>
where F: FnMut(usize, &A) -> U,

source

fn filter<P>(&self, p: P) -> Vec<A>
where A: Copy, P: FnMut(&A) -> bool,

source

fn filter_cloned<P>(&self, p: P) -> Vec<A>
where A: Clone, P: FnMut(&A) -> bool,

source

fn filter_map<P, U>(&self, p: P) -> Vec<U>
where P: FnMut(&A) -> Option<U>,

source

fn find<P>(&self, p: P) -> Option<A>
where A: Copy, P: FnMut(&A) -> bool,

source

fn find_cloned<P>(&self, p: P) -> Option<A>
where A: Clone, P: FnMut(&A) -> bool,

source

fn find_map<P, U>(&self, p: P) -> Option<U>
where P: FnMut(&A) -> Option<U>,

source

fn find_set<P>(&self, p: P, item: A) -> bool
where A: Copy, P: FnMut(&A) -> bool,

source

fn find_set_cloned<P>(&self, p: P, item: A) -> bool
where A: Clone, P: FnMut(&A) -> bool,

source

fn find_set_or_add<P>(&self, p: P, item: A)
where A: Copy, P: FnMut(&A) -> bool,

source

fn find_set_or_add_cloned<P>(&self, p: P, item: A)
where A: Clone, P: FnMut(&A) -> bool,

source

fn find_remove<P>(&self, p: P) -> bool
where A: Copy, P: FnMut(&A) -> bool,

source

fn find_remove_cloned<P>(&self, p: P) -> bool
where A: Clone, P: FnMut(&A) -> bool,

source

fn extend(&self, source: impl IntoIterator<Item = A>)
where A: Copy,

source

fn extend_cloned(&self, source: impl IntoIterator<Item = A>)
where A: Clone,

source

fn replace<P>(&self, what: P, with: impl IntoIterator<Item = A>)
where A: Copy, P: FnMut(&A) -> bool,

source

fn replace_cloned<P>(&self, what: P, with: impl IntoIterator<Item = A>)
where A: Clone, P: FnMut(&A) -> bool,

source

fn replace_or_extend_keyed<F, K>( &self, f: F, source: impl IntoIterator<Item = A>, ) -> bool
where A: Copy, F: FnMut(&A) -> K, K: Eq + Hash,

source

fn replace_or_extend_keyed_cloned<F, K>( &self, f: F, source: impl IntoIterator<Item = A>, ) -> bool
where A: Clone, F: FnMut(&A) -> K, K: Eq + Hash,

source

fn signal_vec_filter<P>(&self, p: P) -> Filter<MutableSignalVec<A>, P>
where A: Copy, P: FnMut(&A) -> bool,

source

fn signal_vec_filter_cloned<P>(&self, p: P) -> Filter<MutableSignalVec<A>, P>
where A: Clone, P: FnMut(&A) -> bool,

source

fn signal_vec_filter_signal<P, S>( &self, p: P, ) -> FilterSignalCloned<MutableSignalVec<A>, S, P>
where A: Copy, P: FnMut(&A) -> S, S: Signal<Item = bool>,

source

fn signal_vec_filter_signal_cloned<P, S>( &self, p: P, ) -> FilterSignalCloned<MutableSignalVec<A>, S, P>
where A: Clone, P: FnMut(&A) -> S, S: Signal<Item = bool>,

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<A> MutableVecExt<A> for MutableVec<A>

source§

fn find_inspect_mut<P, F>(&self, predicate: P, f: F) -> Option<bool>
where A: Copy, P: FnMut(&A) -> bool, F: FnOnce(&mut A) -> bool,

Return parameter of F (changed) drives if the value should be written back, and cause MutableVec change. If F returns false, no change is induced neither reported.

source§

fn find_inspect_mut_cloned<P, F>(&self, predicate: P, f: F) -> Option<bool>
where A: Clone, P: FnMut(&A) -> bool, F: FnOnce(&mut A) -> bool,

Return parameter of F (changed) drives if the value should be written back, and cause MutableVec change. If F returns false, no change is induced neither reported.

source§

fn map_vec<F, U>(&self, f: F) -> U
where F: FnOnce(&[A]) -> U,

source§

fn map_vec_mut<F, U>(&self, f: F) -> U
where F: FnOnce(&mut MutableVecLockMut<'_, A>) -> U,

source§

fn inspect(&self, f: impl FnOnce(&[A]))

source§

fn inspect_mut(&self, f: impl FnOnce(&mut MutableVecLockMut<'_, A>))

source§

fn map<F, U>(&self, f: F) -> Vec<U>
where F: FnMut(&A) -> U,

source§

fn enumerate_map<F, U>(&self, f: F) -> Vec<U>
where F: FnMut(usize, &A) -> U,

source§

fn filter<P>(&self, p: P) -> Vec<A>
where A: Copy, P: FnMut(&A) -> bool,

source§

fn filter_cloned<P>(&self, p: P) -> Vec<A>
where A: Clone, P: FnMut(&A) -> bool,

source§

fn filter_map<P, U>(&self, p: P) -> Vec<U>
where P: FnMut(&A) -> Option<U>,

source§

fn find<P>(&self, p: P) -> Option<A>
where A: Copy, P: FnMut(&A) -> bool,

source§

fn find_cloned<P>(&self, p: P) -> Option<A>
where A: Clone, P: FnMut(&A) -> bool,

source§

fn find_map<P, U>(&self, p: P) -> Option<U>
where P: FnMut(&A) -> Option<U>,

source§

fn find_set<P>(&self, p: P, item: A) -> bool
where A: Copy, P: FnMut(&A) -> bool,

source§

fn find_set_cloned<P>(&self, p: P, item: A) -> bool
where A: Clone, P: FnMut(&A) -> bool,

source§

fn find_set_or_add<P>(&self, p: P, item: A)
where A: Copy, P: FnMut(&A) -> bool,

source§

fn find_set_or_add_cloned<P>(&self, p: P, item: A)
where A: Clone, P: FnMut(&A) -> bool,

source§

fn find_remove<P>(&self, p: P) -> bool
where A: Copy, P: FnMut(&A) -> bool,

source§

fn find_remove_cloned<P>(&self, p: P) -> bool
where A: Clone, P: FnMut(&A) -> bool,

source§

fn extend(&self, source: impl IntoIterator<Item = A>)
where A: Copy,

source§

fn extend_cloned(&self, source: impl IntoIterator<Item = A>)
where A: Clone,

source§

fn replace<P>(&self, p: P, with: impl IntoIterator<Item = A>)
where A: Copy, P: FnMut(&A) -> bool,

source§

fn replace_cloned<P>(&self, p: P, with: impl IntoIterator<Item = A>)
where A: Clone, P: FnMut(&A) -> bool,

source§

fn replace_or_extend_keyed<F, K>( &self, f: F, source: impl IntoIterator<Item = A>, ) -> bool
where A: Copy, F: FnMut(&A) -> K, K: Eq + Hash,

source§

fn replace_or_extend_keyed_cloned<F, K>( &self, f: F, source: impl IntoIterator<Item = A>, ) -> bool
where A: Clone, F: FnMut(&A) -> K, K: Eq + Hash,

source§

fn signal_vec_filter<P>(&self, p: P) -> Filter<MutableSignalVec<A>, P>
where A: Copy, P: FnMut(&A) -> bool,

source§

fn signal_vec_filter_cloned<P>(&self, p: P) -> Filter<MutableSignalVec<A>, P>
where A: Clone, P: FnMut(&A) -> bool,

source§

fn signal_vec_filter_signal<P, S>( &self, p: P, ) -> FilterSignalCloned<MutableSignalVec<A>, S, P>
where A: Copy, P: FnMut(&A) -> S, S: Signal<Item = bool>,

source§

fn signal_vec_filter_signal_cloned<P, S>( &self, p: P, ) -> FilterSignalCloned<MutableSignalVec<A>, S, P>
where A: Clone, P: FnMut(&A) -> S, S: Signal<Item = bool>,

Implementors§