From 3e0134d4715f820f7a2385956b678200afd86c29 Mon Sep 17 00:00:00 2001 From: timofey Date: Sun, 30 Jul 2023 14:15:59 +0000 Subject: [PATCH] `Mode::xmap_err` docs --- src/rcore/modes.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/rcore/modes.rs b/src/rcore/modes.rs index 03b8fbc..b8140a9 100644 --- a/src/rcore/modes.rs +++ b/src/rcore/modes.rs @@ -59,6 +59,11 @@ pub trait Mode { /// Discard any extra information contained in [`Mode::ParseSuccess`]. fn seal(s: Self::ParseSuccess) -> A; + /// Map the error of an extension result. + /// + /// Useful for for wrappers and chaining parsing after [`InliningFactory`]. + /// + /// [`InliningFactory`]: crate::rstd::inlining::InliningFactory fn xmap_err( result: Self::ExtensionResult, f: impl FnOnce(E0) -> E1,