DescriptorSet
The front interface for building/getting descriptors. The objects vended from the here are different from the raw Google_Protobuf_*Proto
types in that they have all the cross object references resolved or wired up, making for an easier to use object model.
final class DescriptorSet
This is like the DescriptorPool
class in the C++ protobuf library.
Citizens in SwiftProtobufPluginLibrary
Type members
init(proto: Google_Protobuf_FileDescriptorSet
) init(protos: [Google_Protobuf_FileDescriptorProto]
) Construct out of a ordered list of
Google_Protobuf_FileDescriptorProto
s likely created by protoc.init(protos: [Google_Protobuf_FileDescriptorProto], featureSetDefaults: Google_Protobuf_FeatureSetDefaults, featureExtensions: [any AnyMessageExtension]
) Construct out of a ordered list of
Google_Protobuf_FileDescriptorProto
s likely created by protoc. Since .proto files can import other .proto files, the imports have to be listed before the things that use them so the graph can be reconstructed.static var bundledEditionsSupport: ClosedRange<Google_Protobuf_Edition>
The range of Editions that the library can support.
Instance members
let files: [FileDescriptor]
The list of
FileDescriptor
s in this set.func descriptor(named: String
) -> Descriptor? Find the
Descriptor
for a named proto message.func enumDescriptor(named: String
) -> EnumDescriptor? Find the
EnumDescriptor
for a named proto enum.func fileDescriptor(named: String
) -> FileDescriptor? Find a specific file. The names for files are what was captured in the
Google_Protobuf_FileDescriptorProto
when it was created, protoc uses the path name for how the file was found.func serviceDescriptor(named: String
) -> ServiceDescriptor? Find the
ServiceDescriptor
for a named proto service.
Show obsolete interfaces (4)
Hide obsolete interfaces
func lookupDescriptor(protoName: String
) -> Descriptor Find the
Descriptor
for a named proto message.func lookupEnumDescriptor(protoName: String
) -> EnumDescriptor Find the
EnumDescriptor
for a named proto enum.func lookupFileDescriptor(protoName: String
) -> FileDescriptor Lookup a specific file. The names for files are what was captured in the
Google_Protobuf_FileDescriptorProto
when it was created, protoc uses the path name for how the file was found.func lookupServiceDescriptor(protoName: String
) -> ServiceDescriptor Find the
ServiceDescriptor
for a named proto service.