FactoryModeParse
for pair
This commit is contained in:
parent
eb9a35f367
commit
68f8a9ca29
@ -139,3 +139,28 @@ impl<A: AtomicBase, B: AtomicBase> AtomicBase for (A, B) {
|
|||||||
impl<A: ParseMode<Mode = InliningMode>, B: ParseMode> ParseMode for (A, B) {
|
impl<A: ParseMode<Mode = InliningMode>, B: ParseMode> ParseMode for (A, B) {
|
||||||
type Mode = B::Mode;
|
type Mode = B::Mode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type PFImpl<'a, Ctx, FA, FB> = StaticPairFactory<
|
||||||
|
'a,
|
||||||
|
Ctx,
|
||||||
|
(
|
||||||
|
<FA as FactoryBase<'a, Ctx>>::Mtbl,
|
||||||
|
<FB as FactoryBase<'a, Ctx>>::Mtbl,
|
||||||
|
),
|
||||||
|
>;
|
||||||
|
|
||||||
|
impl<'a, Ctx: Context<'a>, FA: InliningFactory<'a, Ctx>, FB: FactoryModeParse<'a, Ctx>>
|
||||||
|
FactoryModeParse<'a, Ctx> for (FA, FB)
|
||||||
|
{
|
||||||
|
fn mdeserialize<I: InCtx<'a, Ctx>>(&self, inctx: I) -> ModeResultM<'a, Ctx, Self, I> {
|
||||||
|
PFImpl::<'a, Ctx, FA, FB>::mdeserialize_sp(self, inctx)
|
||||||
|
}
|
||||||
|
|
||||||
|
fn mextend(
|
||||||
|
&self,
|
||||||
|
mentionable: ExtensionSourceM<'a, Ctx, Self>,
|
||||||
|
tail: &[u8],
|
||||||
|
) -> ExtensionResultM<'a, Ctx, Self> {
|
||||||
|
PFImpl::<'a, Ctx, FA, FB>::mextend_sp(self, mentionable, tail)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user