Esc

Extension

structextensionsince 0.36.1Source
  • macOS: Extension works on macOS
  • Linux: Extension works on Linux
  • Windows: Extension works on Windows
  • Wasm: Extension works on Wasm

Declaration

Extension :: struct(Extendee: Type, T: Type, kind: Scalar) {
// The field number.    number: s64;// The full protobuf name, used in error paths.    name: string;// The value of an absent extension (the schema default).    default: T;}

A singular extension of message Extendee holding a T. The Schema module generates one constant per extend field; kind selects the wire form. Without a value get returns default.

See also