Mode
table
This commit is contained in:
parent
8ef8aaf156
commit
a881a77dd3
@ -6,10 +6,18 @@ use super::*;
|
||||
pub type ModeResult<M, A, E, I> = Result<<M as Mode>::ParseSuccess<A, I>, E>;
|
||||
|
||||
/// Mode of parsing.
|
||||
///
|
||||
/// | [`Mode`] | [`Mode::ParseSuccess<A, I>`] | [`Mode::ExtensionResult<A, E>`] | [`Mode::ExtensionSource<A>`] |
|
||||
/// |------------------|------------------------------|---------------------------------|------------------------------|
|
||||
/// | [`RegularMode`] | `A` | [`Result<A, E>`] | `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<A, I>;
|
||||
|
||||
@ -19,7 +27,7 @@ pub trait Mode {
|
||||
type ExtensionResult<A, E>;
|
||||
|
||||
/// Data enough to try extending the value.
|
||||
///
|
||||
///
|
||||
/// May be empty for always-failing extensions.
|
||||
///
|
||||
/// See [`FactoryParse::extend`].
|
||||
|
Loading…
Reference in New Issue
Block a user