From 8e2012ff9cd2049d3459a2dd847ff3946b4713ad Mon Sep 17 00:00:00 2001 From: timofey Date: Sun, 30 Jul 2023 15:33:50 +0000 Subject: [PATCH] `CRegularFactory` docs --- src/rcore/modes.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/rcore/modes.rs b/src/rcore/modes.rs index fac0066..980d607 100644 --- a/src/rcore/modes.rs +++ b/src/rcore/modes.rs @@ -365,10 +365,13 @@ impl Mode for RegularMode { } } +/// For auto-deriving [`RegularFactory`] from concrete implementations. pub trait CRegularFactory<'a, Ctx: Context<'a>>: FactoryBase<'a, Ctx> + ImplMode { + /// Concrete implementation of [`RegularFactory::rdeserialize`]. fn crdeserialize(&self, inctx: impl InCtx<'a, Ctx>) -> ParseResult<'a, Ctx, Self>; + /// Concrete implementation of [`RegularFactory::rextend`]. fn crextend(&self, mentionable: Self::Mtbl, tail: &[u8]) -> ParseResult<'a, Ctx, Self>; }