Thrown in a case of decoding error.
Decodes single value and returns it as CborValue tagged union type. Throws CborException if data is not well-formed. Note, that ubyte[] and string types are slices of input range if ubyte[] was provided. Will modify input range, popping all the bytes of the first item.
Decodes single cbor value and tries to convert it to requested type. If types doesn't match CborException is thrown. Note, that ubyte[] and string types are slices of input range if ubyte[] was provided. Will modify input range, popping all the elements of T.
Decodes single cbor value and tries to convert it to requested type. If types doesn't match CborException is thrown. Note, that this version will dup all arrays for you. Will modify input range, popping all the elements of T.
Encodes value E into output range sink. Returns number of bytes written to sink.
Encodes classes and structs. If withFieldName is yes, than value is encoded as map. If withFieldName is no, then value is encoded as an array.
Encodes array of any items or a tuple as cbor array.
Encodes structs and classes as cbor array.
Encode array head with arrayLength elements. arrayLength items must follow.
Encodes boolean.
Encodes floating.
Encodes integer.
Encodes asociative array as cbor map.
Encodes structs and classes as cbor map. Note, that decoding of structs and classes from maps is not supported (yet).
Encode map head with mapLength elements. mapLength pairs of items must follow. Keys first, then values.
Encodes null.
Encodes range of ubytes.
Encodes string.
Tagged union for CBOR items.
Returns a number of aggregate members that will be encoded by cbor-d.