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>
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.