Instance Methodswift-protobuf 1.28.1SwiftProtobufPluginLibrary
moduleName(forFile:)
Looks up the module a given file is in.
ProtoFileToModuleMappings.swift:115func moduleName(forFile file: FileDescriptor) -> String?
Other members in extension
Types
enum LoadError
Errors raised from parsing mappings
Type members
init(
) init(moduleMappingsProto: SwiftProtobuf_GenSwift_ModuleMappings
) throws Parses the given module mapping. Raises LoadError.
init(moduleMappingsProto: 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?
)
Instance members
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 neededModules(forFile: FileDescriptor
) -> [String]? Returns the list of modules that need to be imported for a given file based on the dependencies it has.