Trait Each

Source
pub trait Each: Sized {
    type View: ?Sized;

    // Required method
    fn each<F>(self, f: F) -> bool
       where F: FnMut(&mut Self::View) -> bool;

    // Provided method
    fn of<Index>(self, i: Index) -> AT<Self, ((), Index)>
       where Self::View: Of<Index>,
             Index: Clone { ... }
}
Expand description

An analogue of the Cps trait.

Required Associated Types§

Required Methods§

Source

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

Provided Methods§

Source

fn of<Index>(self, i: Index) -> AT<Self, ((), Index)>
where Self::View: Of<Index>, Index: Clone,

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<T: ?Sized> Each for &mut T

Source§

type View = T

Source§

fn each<F>(self, f: F) -> bool
where F: FnMut(&mut T) -> bool,

Implementors§

Source§

impl<CPS: Each, Path> Each for AT<CPS, Path>
where Path: OfView<CPS::View>,

Source§

type View = <Path as OfView<<CPS as Each>::View>>::View