This adds accessor functions for options, similar to the existing accessors for extensions.
Options are extensions to the google.protobuf.*Options messages defined in
google/protobuf/descriptor.proto. The accessors provide just a bit more convenience for working with generated descriptors, or descriptors provided by @bufbuild/protoplugin.
For example, let's define a message option and set it on a message:
This adds accessor functions for options, similar to the existing accessors for extensions.
Options are extensions to the
google.protobuf.*Options
messages defined in google/protobuf/descriptor.proto. The accessors provide just a bit more convenience for working with generated descriptors, or descriptors provided by @bufbuild/protoplugin.For example, let's define a message option and set it on a message:
To read the option, use
getOption
: