From a881a77dd382eaa18a81610926630038bf72b5cd Mon Sep 17 00:00:00 2001 From: timofey Date: Sun, 30 Jul 2023 11:07:45 +0000 Subject: [PATCH] `Mode` table --- src/rcore/modes.rs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/rcore/modes.rs b/src/rcore/modes.rs index effbbb4..526e441 100644 --- a/src/rcore/modes.rs +++ b/src/rcore/modes.rs @@ -6,10 +6,18 @@ use super::*; pub type ModeResult = Result<::ParseSuccess, E>; /// Mode of parsing. +/// +/// | [`Mode`] | [`Mode::ParseSuccess`] | [`Mode::ExtensionResult`] | [`Mode::ExtensionSource`] | +/// |------------------|------------------------------|---------------------------------|------------------------------| +/// | [`RegularMode`] | `A` | [`Result`] | `A` | +/// | [`InliningMode`] | `(A, I)` | `E` | [`()`] | +/// +/// [`InliningMode`]: crate::rstd::inlining::InliningMode +/// [`()`]: unit pub trait Mode { /// Successful parsing, may countain the parser itself /// (`I`, usually [`Inlining`]). - /// + /// /// See [`FactoryParse::deserialize`]. type ParseSuccess; @@ -19,7 +27,7 @@ pub trait Mode { type ExtensionResult; /// Data enough to try extending the value. - /// + /// /// May be empty for always-failing extensions. /// /// See [`FactoryParse::extend`].