Skip to main content

VecLikeSolid

Trait VecLikeSolid 

Source
pub trait VecLikeSolid: VecLike {
    // Required methods
    fn swap_remove(&mut self, index: usize) -> Self::Elem;
    fn retain_mut<F>(&mut self, f: F)
       where F: FnMut(&mut Self::Elem) -> bool;
    fn pop_if<F>(&mut self, predicate: F) -> Option<Self::Elem>
       where F: FnOnce(&mut Self::Elem) -> bool;
}

Required Methods§

Source

fn swap_remove(&mut self, index: usize) -> Self::Elem

Source

fn retain_mut<F>(&mut self, f: F)
where F: FnMut(&mut Self::Elem) -> bool,

Source

fn pop_if<F>(&mut self, predicate: F) -> Option<Self::Elem>
where F: FnOnce(&mut Self::Elem) -> bool,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<A: Array> VecLikeSolid for SmallVec<A>

Available on crate feature smallvec only.
Source§

fn swap_remove(&mut self, index: usize) -> Self::Elem

Source§

fn retain_mut<F>(&mut self, f: F)
where F: FnMut(&mut Self::Elem) -> bool,

Source§

fn pop_if<F>(&mut self, predicate: F) -> Option<Self::Elem>
where F: FnOnce(&mut Self::Elem) -> bool,

Source§

impl<S> VecLikeSolid for Cow<'_, S>
where S: ToOwned + Slice, S::Owned: VecLikeSolid<Slice = S>,

Source§

fn swap_remove(&mut self, index: usize) -> Self::Elem

Source§

fn retain_mut<F>(&mut self, f: F)
where F: FnMut(&mut Self::Elem) -> bool,

Source§

fn pop_if<F>(&mut self, predicate: F) -> Option<Self::Elem>
where F: FnOnce(&mut Self::Elem) -> bool,

Source§

impl<T> VecLikeSolid for ArcVec<T>

Available on crate feature rc-vec only.
Source§

fn swap_remove(&mut self, index: usize) -> Self::Elem

Source§

fn retain_mut<F>(&mut self, f: F)
where F: FnMut(&mut Self::Elem) -> bool,

Source§

fn pop_if<F>(&mut self, predicate: F) -> Option<Self::Elem>
where F: FnOnce(&mut Self::Elem) -> bool,

Source§

impl<T> VecLikeSolid for RcVec<T>

Available on crate feature rc-vec only.
Source§

fn swap_remove(&mut self, index: usize) -> Self::Elem

Source§

fn retain_mut<F>(&mut self, f: F)
where F: FnMut(&mut Self::Elem) -> bool,

Source§

fn pop_if<F>(&mut self, predicate: F) -> Option<Self::Elem>
where F: FnOnce(&mut Self::Elem) -> bool,

Source§

impl<T> VecLikeSolid for Vec<T>

Source§

fn swap_remove(&mut self, index: usize) -> Self::Elem

Source§

fn retain_mut<F>(&mut self, f: F)
where F: FnMut(&mut Self::Elem) -> bool,

Source§

fn pop_if<F>(&mut self, predicate: F) -> Option<Self::Elem>
where F: FnOnce(&mut Self::Elem) -> bool,

Source§

impl<V: VecLikeSolid + Clone> VecLikeSolid for Arc<V>

Source§

fn swap_remove(&mut self, index: usize) -> Self::Elem

Source§

fn retain_mut<F>(&mut self, f: F)
where F: FnMut(&mut Self::Elem) -> bool,

Source§

fn pop_if<F>(&mut self, predicate: F) -> Option<Self::Elem>
where F: FnOnce(&mut Self::Elem) -> bool,

Source§

impl<V: VecLikeSolid + Clone> VecLikeSolid for Rc<V>

Source§

fn swap_remove(&mut self, index: usize) -> Self::Elem

Source§

fn retain_mut<F>(&mut self, f: F)
where F: FnMut(&mut Self::Elem) -> bool,

Source§

fn pop_if<F>(&mut self, predicate: F) -> Option<Self::Elem>
where F: FnOnce(&mut Self::Elem) -> bool,

Source§

impl<V: VecLikeSolid> VecLikeSolid for &mut V

Source§

fn swap_remove(&mut self, index: usize) -> Self::Elem

Source§

fn retain_mut<F>(&mut self, f: F)
where F: FnMut(&mut Self::Elem) -> bool,

Source§

fn pop_if<F>(&mut self, predicate: F) -> Option<Self::Elem>
where F: FnOnce(&mut Self::Elem) -> bool,

Source§

impl<V: VecLikeSolid> VecLikeSolid for Box<V>

Source§

fn swap_remove(&mut self, index: usize) -> Self::Elem

Source§

fn retain_mut<F>(&mut self, f: F)
where F: FnMut(&mut Self::Elem) -> bool,

Source§

fn pop_if<F>(&mut self, predicate: F) -> Option<Self::Elem>
where F: FnOnce(&mut Self::Elem) -> bool,

Source§

impl<V: VecLikeSolid> VecLikeSolid for UniqArc<V>

Available on crate feature unique-rc only.
Source§

fn swap_remove(&mut self, index: usize) -> Self::Elem

Source§

fn retain_mut<F>(&mut self, f: F)
where F: FnMut(&mut Self::Elem) -> bool,

Source§

fn pop_if<F>(&mut self, predicate: F) -> Option<Self::Elem>
where F: FnOnce(&mut Self::Elem) -> bool,

Source§

impl<V: VecLikeSolid> VecLikeSolid for UniqRc<V>

Available on crate feature unique-rc only.
Source§

fn swap_remove(&mut self, index: usize) -> Self::Elem

Source§

fn retain_mut<F>(&mut self, f: F)
where F: FnMut(&mut Self::Elem) -> bool,

Source§

fn pop_if<F>(&mut self, predicate: F) -> Option<Self::Elem>
where F: FnOnce(&mut Self::Elem) -> bool,

Implementors§