Mode::xbind docs

This commit is contained in:
AF 2023-07-30 13:55:12 +00:00
parent 44c04431a8
commit 05cb4a2a00

View File

@ -62,6 +62,11 @@ pub trait Mode {
f: impl FnOnce(E0) -> E1, f: impl FnOnce(E0) -> E1,
) -> Self::ExtensionResult<A, E1>; ) -> Self::ExtensionResult<A, E1>;
/// Do something with the extension result, potentially failing.
///
/// Useful for chaining extension after [`InliningFactory`].
///
/// [`InliningFactory`]: crate::rstd::inlining::InliningFactory
fn xbind<A0, A1, E>( fn xbind<A0, A1, E>(
result: Self::ExtensionResult<A0, E>, result: Self::ExtensionResult<A0, E>,
f: impl FnOnce(A0) -> Result<A1, E>, f: impl FnOnce(A0) -> Result<A1, E>,