Divergence

Trait Divergence 

Source
pub trait Divergence: Sealed + StaticDebug {
    type Continue: Continue;

    // Required method
    fn diverge<T, E>(
        result: Result<T, E>,
    ) -> <Self::Continue as Continue>::As<T, E>
       where E: Debug;
}
Expand description

Determines the output type and behavior of a Constrained when it is fallibly constructed.

The output type is defined by an associated output kind. Regardless of this type, this trait implements continuing and breaking on the Result of constructing a Constrained. See the module documentation.

Required Associated Types§

Required Methods§

Source

fn diverge<T, E>(result: Result<T, E>) -> <Self::Continue as Continue>::As<T, E>
where E: Debug,

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<K> Divergence for OrError<K>
where K: Break,

Source§

impl<K> Divergence for OrPanic<K>
where K: Continue,