Required Instance Methodswift-protobuf 1.28.1SwiftProtobuf
fieldNumberForProto(messageType:protoFieldName:)
Returns the field number for a message with a specific field name
ExtensionMap.swift:38func fieldNumberForProto(messageType: any Message.Type, protoFieldName: String) -> Int?
The field name here matches the format used by the protobuf Text serialization: it typically looks like package.message.field_name
, where package
is the package for the proto file and message
is the name of the message in which the extension was defined. (This is different from the message that is being extended!)
Other requirements
Instance members
subscript(any Message.Type, Int
) -> (any AnyMessageExtension)? Returns the extension object describing an extension or nil