Trait MutableVecExt

Source
pub trait MutableVecExt<A> {
Show 34 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_keyed<F, K>( &self, key: F, source: impl IntoIterator<Item = A>, ) -> bool where A: Copy, F: FnMut(&A) -> K, K: Eq + Hash; fn replace_keyed_cloned<F, K>( &self, f: F, source: impl IntoIterator<Item = A>, ) -> bool where A: Clone, F: FnMut(&A) -> K, K: Eq + Hash; fn synchronize<F, K>( &self, key: F, source: impl IntoIterator<Item = A>, ) -> bool where A: Copy, F: FnMut(&A) -> K, K: Eq + Hash; fn synchronize_cloned<F, K>( &self, key: F, source: impl IntoIterator<Item = A>, ) -> bool where A: Clone, F: FnMut(&A) -> K, K: Eq + Hash; fn feed_local(&self, source: impl SignalVec<Item = A> + 'static) where A: Copy + 'static; fn feed_local_cloned(&self, source: impl SignalVec<Item = A> + 'static) where A: Clone + 'static; 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_keyed<F, K>( &self, key: F, source: impl IntoIterator<Item = A>, ) -> bool
where A: Copy, F: FnMut(&A) -> K, K: Eq + Hash,

Source

fn replace_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 synchronize<F, K>(&self, key: F, source: impl IntoIterator<Item = A>) -> bool
where A: Copy, F: FnMut(&A) -> K, K: Eq + Hash,

Source

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

Source

fn feed_local(&self, source: impl SignalVec<Item = A> + 'static)
where A: Copy + 'static,

Source

fn feed_local_cloned(&self, source: impl SignalVec<Item = A> + 'static)
where A: Clone + 'static,

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>,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so 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, 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_keyed<F, K>( &self, key: F, source: impl IntoIterator<Item = A>, ) -> bool
where A: Copy, F: FnMut(&A) -> K, K: Eq + Hash,

Source§

fn replace_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 synchronize<F, K>(&self, key: F, source: impl IntoIterator<Item = A>) -> bool
where A: Copy, F: FnMut(&A) -> K, K: Eq + Hash,

Source§

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

Source§

fn feed_local(&self, source: impl SignalVec<Item = A> + 'static)
where A: Copy + 'static,

Source§

fn feed_local_cloned(&self, source: impl SignalVec<Item = A> + 'static)
where A: Clone + 'static,

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§