ProtoNameProviding.swift 989 B

12345678910111213141516171819202122
  1. // Sources/SwiftProtobuf/ProtoNameProviding.swift - Support for accessing proto names
  2. //
  3. // Copyright (c) 2014 - 2016 Apple Inc. and the project authors
  4. // Licensed under Apache License v2.0 with Runtime Library Exception
  5. //
  6. // See LICENSE.txt for license information:
  7. // https://github.com/apple/swift-protobuf/blob/main/LICENSE.txt
  8. //
  9. // -----------------------------------------------------------------------------
  10. /// SwiftProtobuf Internal: Common support looking up field names.
  11. ///
  12. /// Messages conform to this protocol to provide the proto/text and JSON field
  13. /// names for their fields. This allows these names to be pulled out into
  14. /// extensions in separate files so that users can omit them in release builds
  15. /// (reducing bloat and minimizing leaks of field names).
  16. public protocol _ProtoNameProviding {
  17. /// The mapping between field numbers and proto/JSON field names defined in
  18. /// the conforming message type.
  19. static var _protobuf_nameMap: _NameMap { get }
  20. }