Mode::bind
/Mode::map
docs
This commit is contained in:
parent
37a38f5c2a
commit
44c04431a8
@ -34,11 +34,21 @@ pub trait Mode {
|
||||
/// See [`FactoryParse::extend`].
|
||||
type ExtensionSource<A>;
|
||||
|
||||
/// Do something with the successfully parsed value, potentially failing.
|
||||
///
|
||||
/// Useful for chaining parsing after [`InliningFactory`].
|
||||
///
|
||||
/// See also [`Mode::map`]
|
||||
///
|
||||
/// [`InliningFactory`]: crate::rstd::inlining::InliningFactory
|
||||
fn bind<A0, A1, E, I>(
|
||||
s: Self::ParseSuccess<A0, I>,
|
||||
f: impl FnOnce(A0) -> Result<A1, E>,
|
||||
) -> ModeResult<Self, A1, E, I>;
|
||||
|
||||
/// Map the successfully parsed value.
|
||||
///
|
||||
/// See also [`Mode::bind`]
|
||||
fn map<A0, A1, I>(
|
||||
s: Self::ParseSuccess<A0, I>,
|
||||
f: impl FnOnce(A0) -> A1,
|
||||
|
@ -2,7 +2,7 @@
|
||||
//! See [`TypelessMentionable::cast`]/[`Point::cast`].
|
||||
//!
|
||||
//! p.s. the implementation is horrific.
|
||||
//!
|
||||
//!
|
||||
//! [`rcore`]: crate::rcore
|
||||
|
||||
use std::convert::identity;
|
||||
|
@ -1,5 +1,5 @@
|
||||
//! Previously part of [`rcore`].
|
||||
//!
|
||||
//!
|
||||
//! [`rcore`]: crate::rcore
|
||||
|
||||
use super::{cast::CastError, wrapped_origin::*, *};
|
||||
|
Loading…
Reference in New Issue
Block a user