Trait CollapsibleExt

Source
pub trait CollapsibleExt: Collapsible
where 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§

Source

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

Source

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.

Implementors§

Source§

impl<X> CollapsibleExt for X
where X: Collapsible,