RegularFactory docs

This commit is contained in:
AF 2023-07-30 15:41:52 +00:00
parent dcb8fdfaff
commit 6cdc08112c

View File

@ -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<Mode = RegularMode>
{
/// 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>;
}