supportedEditionRange
The Protobuf Edition range that this generator can handle. Attempting to generate for an Edition outside this range will cause protoc to error.
var supportedEditionRange: ClosedRange<Google_Protobuf_Edition> { get }
The Protobuf Edition range that this generator can handle. Attempting to generate for an Edition outside this range will cause protoc to error.
var supportedEditionRange: ClosedRange<Google_Protobuf_Edition> { get }
s26SwiftProtobufPluginLibrary13CodeGeneratorP21supportedEditionRangeSNy0aB007Google_b1_H0OAGSLAAyHCg_Gvp
What are these?6P2LL
import SwiftProtobufPluginLibrary
A reusable framework for building protoc
plugins in Swift.
protocol CodeGenerator
A protocol that generator should conform to then get easy support for being a protocol buffer compiler pluign.
@frozen struct ClosedRange<Bound> where Bound : Comparable
An interval from a lower bound up to, and including, an upper bound.
enum Google_Protobuf_Edition
The full set of known editions.
init()
var copyrightLine: String? { get }
If provided and printHelp
isn’t provide, this value will be including in default output for the --help
output.
var customOptionExtensions: [any AnyMessageExtension] { get }
A list of extensions that define Custom Options (https://protobuf.dev/programming-guides/proto2/#customoptions) for this generator so they will be exposed on the Descriptor
options.
var projectURL: String? { get }
If provided and printHelp
isn’t provide, this value will be including in default output for the --help
output.
var supportedFeatures: [Google_Protobuf_Compiler_CodeGeneratorResponse.Feature] { get }
The list of features this CodeGenerator support to be reported back to the protocol buffer compiler.
var version: String? { get }
If provided, the argument parsing will support --version
and report this value.
func generate(files: [FileDescriptor], parameter: any CodeGeneratorParameter, protoCompilerContext: any ProtoCompilerContext, generatorOutputs: any GeneratorOutputs) throws
Generates code for the given proto files.
func printHelp()
Will be called for -h
or --help
, should print()
out whatever is desired; there is a default implementation that uses the above info when provided.
var supportedEditionRange: ClosedRange<Google_Protobuf_Edition> { get }