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>; }