AParseResultM
-> AModeResultM
This commit is contained in:
parent
9d9c86033a
commit
7644bbc14c
@ -15,7 +15,7 @@ use crate::rcore::*;
|
||||
use super::*;
|
||||
|
||||
pub use self::modes::{
|
||||
AExtensionResultM, AExtensionSourceM, AParseResultM, AtomicModeParse, AtomicModeProxy,
|
||||
AExtensionResultM, AExtensionSourceM, AModeResultM, AtomicModeParse, AtomicModeProxy,
|
||||
RegularAtomic,
|
||||
};
|
||||
|
||||
|
@ -10,14 +10,17 @@ impl<A: AtomicModeParse> Atomic for A {
|
||||
}
|
||||
}
|
||||
|
||||
pub type AParseResultM<A, I> = ModeResultP<A, A, AParseError<A>, I>;
|
||||
/// [`Atomic`] equivalent of [`ModeResult`].
|
||||
pub type AModeResultM<A, I> = ModeResultP<A, A, AParseError<A>, I>;
|
||||
|
||||
/// [`Atomic`] equivalent of [`ExtensionResult`].
|
||||
pub type AExtensionResultM<A> = ExtensionResultP<A, A, AParseError<A>>;
|
||||
|
||||
/// [`Atomic`] equivalent of [`ExtensionSource`].
|
||||
pub type AExtensionSourceM<A> = ExtensionSourceP<A, A>;
|
||||
|
||||
pub trait AtomicModeParse: AtomicBase + ParseMode {
|
||||
fn ma_deserialize<I: Inlining>(inlining: I) -> AParseResultM<Self, I>;
|
||||
fn ma_deserialize<I: Inlining>(inlining: I) -> AModeResultM<Self, I>;
|
||||
|
||||
fn ma_extend(atomic: AExtensionSourceM<Self>, tail: &[u8]) -> AExtensionResultM<Self>;
|
||||
}
|
||||
@ -25,7 +28,7 @@ pub trait AtomicModeParse: AtomicBase + ParseMode {
|
||||
pub trait AtomicModeProxy {
|
||||
type A: AtomicBase + ParseMode;
|
||||
|
||||
fn pma_deserialize<I: Inlining>(inlining: I) -> AParseResultM<Self::A, I>;
|
||||
fn pma_deserialize<I: Inlining>(inlining: I) -> AModeResultM<Self::A, I>;
|
||||
|
||||
fn pma_extend(atomic: AExtensionSourceM<Self::A>, tail: &[u8]) -> AExtensionResultM<Self::A>;
|
||||
}
|
||||
@ -34,7 +37,7 @@ impl<A: AtomicBase + WithParseMode> AtomicModeParse for A
|
||||
where
|
||||
<A as WithParseMode>::WithMode: AtomicModeProxy<A = A>,
|
||||
{
|
||||
fn ma_deserialize<I: Inlining>(inlining: I) -> AParseResultM<Self, I> {
|
||||
fn ma_deserialize<I: Inlining>(inlining: I) -> AModeResultM<Self, I> {
|
||||
<<A as WithParseMode>::WithMode as AtomicModeProxy>::pma_deserialize(inlining)
|
||||
}
|
||||
|
||||
@ -51,7 +54,7 @@ pub trait RegularAtomic: AtomicBase + ParseMode<Mode = RegularMode> {
|
||||
impl<A: RegularAtomic> AtomicModeProxy for WithMode<A, RegularMode> {
|
||||
type A = A;
|
||||
|
||||
fn pma_deserialize<I: Inlining>(inlining: I) -> AParseResultM<Self::A, I> {
|
||||
fn pma_deserialize<I: Inlining>(inlining: I) -> AModeResultM<Self::A, I> {
|
||||
A::ra_deserialize(inlining)
|
||||
}
|
||||
|
||||
|
@ -87,7 +87,7 @@ impl<'a, Ctx: Context<'a>, F: QInliningFactory<'a, Ctx>> FactoryModeProxy<'a, Ct
|
||||
impl<A: QInliningAtomic> AtomicModeProxy for WithMode<A, InliningMode> {
|
||||
type A = A;
|
||||
|
||||
fn pma_deserialize<I: Inlining>(inlining: I) -> AParseResultM<Self::A, I> {
|
||||
fn pma_deserialize<I: Inlining>(inlining: I) -> AModeResultM<Self::A, I> {
|
||||
A::qa_ideserialize(inlining)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user