Skip to main content

ConsumingFallible

Trait ConsumingFallible 

Source
pub trait ConsumingFallible: Clone { }
Expand description

Bound for the receiver of a fallible consuming method (self -> Result<Self, E> / self -> Option<Self>).

The generated wrapper calls the method on a clone of the stored value and only overwrites the R handle on Ok / Some, so a failed step leaves the R object exactly as it was, which is what an interactive R user expects from obj |> add_step(-1) erroring. Blanket-implemented for every T: Clone; the on_unimplemented text below is what rustc prints when the type is not Clone.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§