FactoryParse docs

This commit is contained in:
AF 2023-07-30 17:35:34 +00:00
parent a2cba66a29
commit f13a1382f8

View File

@ -111,8 +111,9 @@ pub trait FactoryBase<'a, Ctx: Context<'a>>: 'a + Send + Sync + Clone {
type ParseError: 'a + Error;
}
/// [Factory] that allows parsing consuming the parser.
pub trait FactoryParse<'a, Ctx: Context<'a>>: FactoryModeParse<'a, Ctx> {
/// See [`Deserializer`], [`Resolver`].
/// Consumes the parser. See [`Deserializer`], [`Resolver`].
fn deserialize(&self, inctx: impl InCtx<'a, Ctx>) -> ParseResult<'a, Ctx, Self>;
/// Called by finite stream parsers if there's any data left.
fn extend(&self, mentionable: Self::Mtbl, tail: &[u8]) -> ParseResult<'a, Ctx, Self>;