InliningAtomic
docs
This commit is contained in:
parent
96018d80dd
commit
2c22dd690f
@ -1,20 +1,27 @@
|
|||||||
pub use super::*;
|
pub use super::*;
|
||||||
|
|
||||||
|
/// Inlining version of [`AParseResult`]. Preserves the parser.
|
||||||
pub type AIParseResult<A, I> = Result<(A, I), AParseError<A>>;
|
pub type AIParseResult<A, I> = Result<(A, I), AParseError<A>>;
|
||||||
|
|
||||||
|
/// For auto-deriving [`InliningAtomic`] from concrete implementations.
|
||||||
pub trait CInliningAtomic: AtomicBase + ImplMode<Mode = InliningMode> {
|
pub trait CInliningAtomic: AtomicBase + ImplMode<Mode = InliningMode> {
|
||||||
|
/// Concrete implementation of [`InliningAtomic::a_extension_error`].
|
||||||
fn ca_extension_error(tail: &[u8]) -> Self::AParseError;
|
fn ca_extension_error(tail: &[u8]) -> Self::AParseError;
|
||||||
|
|
||||||
|
/// Concrete implementation of [`InliningAtomic::a_ideserialize`].
|
||||||
fn ca_ideserialize<I: Stream>(stream: I) -> AIParseResult<Self, I>;
|
fn ca_ideserialize<I: Stream>(stream: I) -> AIParseResult<Self, I>;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Atomic analogue of [`InliningFactory`]/[`InliningObject`].
|
/// [`Atomic`] analogue of [`InliningFactory`]/[`InliningObject`].
|
||||||
///
|
///
|
||||||
/// [`InliningFactory`]: crate::rcore::InliningFactory
|
/// [`InliningFactory`]: crate::rcore::InliningFactory
|
||||||
/// [`InliningObject`]: crate::rstd::inlining::InliningObject
|
/// [`InliningObject`]: crate::rstd::inlining::InliningObject
|
||||||
pub trait InliningAtomic: AtomicBase + ParseMode<Mode = InliningMode> {
|
pub trait InliningAtomic: AtomicBase + ParseMode<Mode = InliningMode> {
|
||||||
|
/// Always fail on extension,
|
||||||
|
/// as parsing of an inlining atomic should be determined without reaching EOF.
|
||||||
fn a_extension_error(tail: &[u8]) -> Self::AParseError;
|
fn a_extension_error(tail: &[u8]) -> Self::AParseError;
|
||||||
|
|
||||||
|
/// Inlining version of [`Atomic::a_deserialize`]. Preserves the parser.
|
||||||
fn a_ideserialize<I: Stream>(strean: I) -> AIParseResult<Self, I>;
|
fn a_ideserialize<I: Stream>(strean: I) -> AIParseResult<Self, I>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user