init(path:)
Loads and parses the given module mapping from disk. Raises LoadError or TextFormatDecodingError.
init(path: String) throws
Loads and parses the given module mapping from disk. Raises LoadError or TextFormatDecodingError.
init(path: String) throws
s26SwiftProtobufPluginLibrary25ProtoFileToModuleMappingsV4pathACSS_tKcfc
What are these?BA78
import SwiftProtobufPluginLibrary
A reusable framework for building protoc
plugins in Swift.
struct ProtoFileToModuleMappings
Handles the mapping of proto files to the modules they will be compiled into.
@frozen struct String
A Unicode string value that is a collection of characters.
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, 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