invalidate method

void invalidate()

Reject the running decode as INVALID from inside a callback.

The wire layer judges what the format can decide on its own; a schema bound — an array index past the declared capacity, a string past its maxlen, a value outside its declared width — is knowable only to the consumer, and MESSAGE_SPEC §7.1 makes it INVALID all the same.

Calling this stops the decode where it stands: no further field is delivered, and Decoder.feed / Decoder.decode report DecodeStatus.invalid, which is terminal (CORELIB_PLAN §5.2).

Safe from any depth, including inside a nested collector. It never returns normally.

Implementation

void invalidate() => throw const _Invalidated();