From 6cdc08112c4237ef84023dc737a8c7a4103a63ec Mon Sep 17 00:00:00 2001 From: timofey Date: Sun, 30 Jul 2023 15:41:52 +0000 Subject: [PATCH] `RegularFactory` docs --- src/rcore/modes.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/rcore/modes.rs b/src/rcore/modes.rs index 980d607..9d08573 100644 --- a/src/rcore/modes.rs +++ b/src/rcore/modes.rs @@ -375,10 +375,13 @@ pub trait CRegularFactory<'a, Ctx: Context<'a>>: fn crextend(&self, mentionable: Self::Mtbl, tail: &[u8]) -> ParseResult<'a, Ctx, Self>; } +/// Mostly same as [`FactoryModeParse`] but requires [`Mode`] to be [`RegularMode`]. pub trait RegularFactory<'a, Ctx: Context<'a>>: FactoryBase<'a, Ctx> + ParseMode { + /// Same as [`FactoryModeParse::mdeserialize`]. fn rdeserialize(&self, inctx: impl InCtx<'a, Ctx>) -> ParseResult<'a, Ctx, Self>; + /// Same as [`FactoryModeParse::mextend`]. fn rextend(&self, mentionable: Self::Mtbl, tail: &[u8]) -> ParseResult<'a, Ctx, Self>; }