Trait VecLikeAbstract

Source
pub trait VecLikeAbstract: VecLike {
    type Indices<'a>: Iterator<Item = (usize, Self::Elem)>
       where Self: 'a;

    // Required methods
    fn retain<F>(&mut self, f: F)
       where F: FnMut(Self::Elem) -> bool;
    fn elem_indices(&self) -> Self::Indices<'_>;
}

Required Associated Types§

Source

type Indices<'a>: Iterator<Item = (usize, Self::Elem)> where Self: 'a

Required Methods§

Source

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

Source

fn elem_indices(&self) -> Self::Indices<'_>

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 VecLikeAbstract for String

Source§

type Indices<'a> = CharIndices<'a>

Source§

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

Source§

fn elem_indices(&self) -> Self::Indices<'_>

Source§

impl<A: Array<Item = u8>> VecLikeAbstract for SmallString<A>

Available on crate feature smallstr only.
Source§

type Indices<'a> = CharIndices<'a> where A: 'a

Source§

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

Source§

fn elem_indices(&self) -> Self::Indices<'_>

Implementors§