ProtoFileToModuleMappings
Handles the mapping of proto files to the modules they will be compiled into.
struct ProtoFileToModuleMappings
Handles the mapping of proto files to the modules they will be compiled into.
struct ProtoFileToModuleMappings
s26SwiftProtobufPluginLibrary25ProtoFileToModuleMappingsV
What are these?6RD9V
import SwiftProtobufPluginLibrary
A reusable framework for building protoc
plugins in Swift.
init()
init(moduleMappingsProto mappings: SwiftProtobuf_GenSwift_ModuleMappings) throws
Parses the given module mapping. Raises LoadError.
init(moduleMappingsProto mappings: SwiftProtobuf_GenSwift_ModuleMappings, swiftProtobufModuleName: String?) throws
Parses the given module mapping. Raises LoadError.
init(path: String) throws
Loads and parses the given module mapping from disk. Raises LoadError or TextFormatDecodingError.
init(path: String, swiftProtobufModuleName: String?) throws
Loads and parses the given module mapping from disk. Raises LoadError or TextFormatDecodingError.
init(swiftProtobufModuleName: String?)
let hasMappings: Bool
A Boolean value that indicates that there were developer provided mappings.
let swiftProtobufModuleName: String
The name of the runtime module for SwiftProtobuf (usually “SwiftProtobuf”). We expect to find the WKTs in the module named here.
func moduleName(forFile file: FileDescriptor) -> String?
Looks up the module a given file is in.
func neededModules(forFile file: FileDescriptor) -> [String]?
Returns the list of modules that need to be imported for a given file based on the dependencies it has.
enum LoadError
Errors raised from parsing mappings