Esc

check_extension

procedureextensionsince 0.36.1Source
  • macOS: check_extension works on macOS
  • Linux: check_extension works on Linux
  • Windows: check_extension works on Windows
  • Wasm: check_extension works on Wasm

Validates an extension value met while decoding, as a normal field of that type would be: a string must be UTF-8, and a message must decode. Called from the extendee's generated decoder only for extensions that need it; skip_utf8 turns the check off.

Signature

check_extension :: (
    r: *Reader,
    tag: u64,
    $kind: Scalar,
    $T: Type,
    name: string
) -> bool

See also