pub trait TailRec<Output, F> {
// Provided methods
fn rec(self, iterate: F) -> Output
where Self: Sized,
F: Fn(Self) -> Result<Output, Self> { ... }
fn rec_ref<'a>(&'a self, iterate: F) -> Output
where F: for<'r> Fn(&'r Self) -> Result<Output, &'r Self> { ... }
fn rec_mut(self, iterate: F) -> Output
where Self: Sized,
F: FnMut(Self) -> Result<Output, Self> { ... }
fn rec_ref_mut<'a>(&'a mut self, iterate: F) -> Output
where F: for<'r> FnMut(&'r mut Self) -> Result<Output, &'r mut Self> { ... }
}
Provided Methods§
fn rec(self, iterate: F) -> Output
fn rec_ref<'a>(&'a self, iterate: F) -> Output
fn rec_mut(self, iterate: F) -> Output
fn rec_ref_mut<'a>(&'a mut self, iterate: F) -> Output
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.