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§
Sourcefn branches<T>(&'a self) -> impl Iterator<Item = T>where
&'a Self: HasBranches<T>,
T: 'a,
fn branches<T>(&'a self) -> impl Iterator<Item = T>where
&'a Self: HasBranches<T>,
T: 'a,
Iterates over the branches of a type.
Sourcefn branches_mut<T>(&'a mut self) -> impl Iterator<Item = T>where
&'a mut Self: HasBranches<T>,
T: 'a,
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.
fn all_branches<T>(&'a self) -> impl Iterator<Item = T>
fn all_branches_mut<T>(&'a mut self) -> impl Iterator<Item = T>
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.