SofaBuffers TypeScript - v0.11.0
    Preparing search index...

    Variable DecodeStatusConst

    DecodeStatus: {
        Complete: "COMPLETE";
        Incomplete: "INCOMPLETE";
        Invalid: "INVALID";
    } = ...

    The terminal outcome of a decode (MESSAGE_SPEC §7), reported identically for one-shot and streaming decode with no finish / finalize / end promotion step:

    • Complete — the bytes ended exactly at a field boundary: a valid message.
    • Incomplete — the bytes ended inside a field (an unterminated varint, a payload shorter than its declared length, an array that runs off the end, or a nested sequence never closed). Not an error — more bytes could complete it, and the caller owns end-of-input.
    • Invalid — the bytes are malformed regardless of what follows. Terminal (CORELIB_PLAN §5.2): no later bytes can undo it.

    Each of the three leaves by exactly one channel. IStream.feed returns Complete or Incomplete — that is the FeedStatus pair, and the caller needs no end step (CORELIB_PLAN §6). Invalid is never returned by anything: it is the name of the outcome the throw carries, a SofabError whose code is SofabErrorCode.InvalidMsg, and the verdict latches, so every further feed re-throws without consuming input. There is no accessor that re-reports any of the three, because a fact with two ways to learn it is a fact that can be learned two different ways.

    The one-shot decode — the same stream, fed once — signals Incomplete and Invalid by throwing a SofabError whose code is SofabErrorCode.Incomplete or SofabErrorCode.InvalidMsg, and Complete by returning normally.

    Type Declaration

    • ReadonlyComplete: "COMPLETE"

      The bytes ended exactly at a field boundary — a valid message.

    • ReadonlyIncomplete: "INCOMPLETE"

      The bytes ended inside a field; more bytes could complete it (not an error).

    • ReadonlyInvalid: "INVALID"

      The bytes are malformed regardless of what follows.