Trait HasBranchesAPIV2

Source
pub trait HasBranchesAPIV2<'a> {
    // Provided methods
    fn branches<T>(&'a self) -> impl Iterator<Item = T>
       where &'a Self: HasBranches<T>,
             T: 'a { ... }
    fn branches_mut<T>(&'a mut self) -> impl Iterator<Item = T>
       where &'a mut Self: HasBranches<T>,
             T: 'a { ... }
    fn all_branches<T>(&'a self) -> impl Iterator<Item = T>
       where &'a Self: HasBranches<T>,
             T: 'a + HasBranches<T> + Copy { ... }
    fn all_branches_mut<T>(&'a mut self) -> impl Iterator<Item = T>
       where &'a mut Self: HasBranches<T>,
             T: 'a + HasBranches<T> + Copy { ... }
}
Expand description

This is the trait one should implement to provide a way to iterate over the branches of a type.

Provided Methods§

Source

fn branches<T>(&'a self) -> impl Iterator<Item = T>
where &'a Self: HasBranches<T>, T: 'a,

Iterates over the branches of a type.

Source

fn branches_mut<T>(&'a mut self) -> impl Iterator<Item = T>
where &'a mut Self: HasBranches<T>, T: 'a,

Iterates over the branches of a type mutably.

Source

fn all_branches<T>(&'a self) -> impl Iterator<Item = T>
where &'a Self: HasBranches<T>, T: 'a + HasBranches<T> + Copy,

Source

fn all_branches_mut<T>(&'a mut self) -> impl Iterator<Item = T>
where &'a mut Self: HasBranches<T>, T: 'a + HasBranches<T> + Copy,

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.

Implementors§

Source§

impl<'a, T> HasBranchesAPIV2<'a> for T