Sha256: e4de398d99394dd27c6588228cb0d5ad09d39253a7e07c4eb2e1f127187ac754
Contents?: true
Size: 1.39 KB
Versions: 17
Compression:
Stored size: 1.39 KB
Contents
# frozen_string_literal: true require_relative 'cbor/encoder' require_relative 'cbor/decoder' module Aws # @api private module Cbor # CBOR Tagged data (Major type 6). # A Tag consists of a tag number and a value. # In the extended generic data model, a tag number's definition # describes the additional semantics conveyed with the tag number. # # @!method initialize(*args) # @option args [Integer] :tag The tag number. # @option args [Object] :value The tag's content. # @!attribute tag # The tag number. # @return [Integer] # @!attribute value # The tag's content. # @return [Object] Tagged = Struct.new(:tag, :value) class Error < StandardError; end class OutOfBytesError < Error def initialize(n, left) super("Out of bytes. Trying to read #{n} bytes but buffer contains only #{left}") end end class UnknownTypeError < Error def initialize(type) super("Unable to encode #{type}") end end class ExtraBytesError < Error def initialize(pos, size) super("Extra bytes follow after decoding item. Read #{pos} / #{size} bytes") end end class UnexpectedBreakCodeError < Error; end class UnexpectedAdditionalInformationError < Error def initialize(add_info) super("Unexpected additional information: #{add_info}") end end end end
Version data entries
17 entries across 17 versions & 1 rubygems