pub struct Partial;Expand description
The partial completeness: the input is a prefix of a stream that may still grow.
Carries a runtime is_final: bool — a fact about the world, which the driver states by
sealing the input when the last chunk lands (parse_partial’s
is_final argument). While non-final the
frontier rules hold back any construct that might be
extended by later input, surfacing an Incomplete so the caller can
refill and re-drive; once final it behaves exactly like Complete.
A parser cannot reach the bit: it is settable only through the owning input, which an
InputRef borrows for its whole life. See Completeness.
The rules hold back only what more input could change. A terminal condition — a resource-limit trip and the poison boundary it latches — is not such a thing: it fires through the frontier rather than hiding behind them, so a streaming caller is never told to refill for a limit that can never clear. See terminal beats incomplete.
Trait Implementations§
Source§impl Completeness for Partial
impl Completeness for Partial
impl Copy for Partial
impl Eq for Partial
impl StructuralPartialEq for Partial
Source§impl<'inp, L, Ctx, Lang: ?Sized> SurfaceIncomplete<'inp, L, Ctx, Lang> for Partialwhere
L: Lexer<'inp>,
Ctx: ParseContext<'inp, L, Lang>,
<Ctx::Emitter as Emitter<'inp, L, Lang>>::Error: From<Incomplete<L::Offset>> + MaybeIncomplete,
impl<'inp, L, Ctx, Lang: ?Sized> SurfaceIncomplete<'inp, L, Ctx, Lang> for Partialwhere
L: Lexer<'inp>,
Ctx: ParseContext<'inp, L, Lang>,
<Ctx::Emitter as Emitter<'inp, L, Lang>>::Error: From<Incomplete<L::Offset>> + MaybeIncomplete,
Source§fn surface_incomplete(
offset: L::Offset,
) -> <Ctx::Emitter as Emitter<'inp, L, Lang>>::Error
fn surface_incomplete( offset: L::Offset, ) -> <Ctx::Emitter as Emitter<'inp, L, Lang>>::Error
Incomplete at offset — the offset the input ran out
at (the frontier). Called only in partial, non-final mode.