FallibleContext docs

This commit is contained in:
AF 2023-07-06 03:42:12 +00:00
parent 41b8a192bf
commit 10193ccd5b

View File

@ -6,10 +6,9 @@ use crate::func::context::*;
use super::*;
/// Extention trait for simpler conversion between [`FunctorContext::T`] and [`Context::Fallible`].
/// Extention trait for simpler conversion between [`FunctorContext::T`] and [`FallibleCtx::Fallible`].
///
/// Until either Rust type system or [`crate::func`] take serious changes,
/// this is the preferred way to switch between [Wrapped] and [fallible].
/// this is the preferred way to switch between [WrapC] and [FallibleWrapped].
pub trait FallibleContext<'a>: FallibleCtx<'a> {
/// Convert a fallible wrapped into a wrapped result.
fn unstuff<A: 'a, E: 'a>(wa: FallibleWrapped<'a, Self, A, E>) -> WrapC<'a, Result<A, E>, Self> {