Trait recursion::CollapsibleExt
source · pub trait CollapsibleExt: Collapsiblewhere
Self: Sized,{
// Required methods
fn collapse_frames<Out>(
self,
collapse_frame: impl FnMut(<Self::FrameToken as MappableFrame>::Frame<Out>) -> Out
) -> Out;
fn try_collapse_frames<Out, E>(
self,
collapse_frame: impl FnMut(<Self::FrameToken as MappableFrame>::Frame<Out>) -> Result<Out, E>
) -> Result<Out, E>;
}
Required Methods§
sourcefn collapse_frames<Out>(
self,
collapse_frame: impl FnMut(<Self::FrameToken as MappableFrame>::Frame<Out>) -> Out
) -> Out
fn collapse_frames<Out>( self, collapse_frame: impl FnMut(<Self::FrameToken as MappableFrame>::Frame<Out>) -> Out ) -> Out
Given an instance of this type, collapse it into a single value of type Out
by
traversing the recursive structure of self
, generating frames, and collapsing
those frames using some function from Frame<Out> -> Out
sourcefn try_collapse_frames<Out, E>(
self,
collapse_frame: impl FnMut(<Self::FrameToken as MappableFrame>::Frame<Out>) -> Result<Out, E>
) -> Result<Out, E>
fn try_collapse_frames<Out, E>( self, collapse_frame: impl FnMut(<Self::FrameToken as MappableFrame>::Frame<Out>) -> Result<Out, E> ) -> Result<Out, E>
Given an instance of this type, collapse it into a single value of type Result<Out, E>
by
traversing the recursive structure of self
, generating frames, and collapsing
those frames using some function from Frame<Out> -> Result<Out, E>
Object Safety§
This trait is not object safe.