BinaryEncodingError.swift 1.1 KB

123456789101112131415161718192021222324
  1. // Sources/SwiftProtobuf/BinaryEncodingError.swift - Error constants
  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. ///
  11. /// Enum constants that identify the particular error.
  12. ///
  13. // -----------------------------------------------------------------------------
  14. /// Describes errors that can occur when decoding a message from binary format.
  15. public enum BinaryEncodingError: Error, Hashable {
  16. /// An unexpected failure when deserializing a `Google_Protobuf_Any`.
  17. case anyTranscodeFailure
  18. /// The definition of the message or one of its nested messages has required
  19. /// fields but the message being encoded did not include values for them. You
  20. /// must pass `partial: true` during encoding if you wish to explicitly ignore
  21. /// missing required fields.
  22. case missingRequiredFields
  23. }