- assertEqual
void assertEqual(A a, B b)
Undocumented in source. Be warned that the author may not have intended to support it.
- assertHexAndClear
void assertHexAndClear(string hex)
Undocumented in source. Be warned that the author may not have intended to support it.
- assertToken
void assertToken(CborToken expected)
Undocumented in source. Be warned that the author may not have intended to support it.
- assertf
void assertf(bool condition, string formatStr, Args args)
Undocumented in source. Be warned that the author may not have intended to support it.
- decodeCbor
void decodeCbor(R input, T outValue)
Undocumented in source. Be warned that the author may not have intended to support it.
- decodeCborSingle
T decodeCborSingle(R input)
Decodes single cbor value and tries to convert it to requested type.
If types don't match CborException is thrown.
Note, that ubyte[] and string types are slices of input range if ubyte[] was provided.
Will consume input range, decoding all the elements of T.
- decodeCborSingleDup
T decodeCborSingleDup(R input)
Decodes single cbor value and tries to convert it to requested type.
If types don't match CborException is thrown.
Note, that this version will dup all array slices for you.
Will consume input range, decoding all the elements of T.
- decodeCborToken
CborToken decodeCborToken(R input)
Undocumented in source. Be warned that the author may not have intended to support it.
- encodeCbor
size_t encodeCbor(R sink, E value)
Encodes value E into output range sink.
Returns number of bytes written to sink.
If flatten flag is yes then static arrays and structs will be encoded in place without headers.
- encodeCborAggregate
size_t encodeCborAggregate(R sink, A aggregate)
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.
If flatten flag is yes then static arrays and structs will be encoded in place without headers.
- encodeCborArray
size_t encodeCborArray(R sink, E value)
Encodes array of any items or a tuple as cbor array.
- encodeCborArray
size_t encodeCborArray(R sink, A aggregate)
Encodes structs and classes as cbor array.
- encodeCborArrayHeader
size_t encodeCborArrayHeader(R sink, ulong arrayLength)
Undocumented in source. Be warned that the author may not have intended to support it.
- encodeCborArrayHeader
size_t encodeCborArrayHeader(R sink)
Undocumented in source. Be warned that the author may not have intended to support it.
- encodeCborBool
size_t encodeCborBool(R sink, E value)
- encodeCborBreak
size_t encodeCborBreak(R sink)
Encodes break. Use after all items of indefinite-length sequence were encoded.
- encodeCborBytes
size_t encodeCborBytes(R sink, E value)
- encodeCborBytesHeader
size_t encodeCborBytesHeader(R sink, ulong bytesLength)
Undocumented in source. Be warned that the author may not have intended to support it.
- encodeCborBytesHeader
size_t encodeCborBytesHeader(R sink)
Undocumented in source. Be warned that the author may not have intended to support it.
- encodeCborBytesItems
size_t encodeCborBytesItems(R sink, D bytes)
Writes range of ubyte to the sink. Needs to go after a call to encodeCborBytesHeader.
The length of supplied range must be equal to one provided to encodeCborBytesHeader.
- encodeCborFloat
size_t encodeCborFloat(R sink, E value)
- encodeCborInt
size_t encodeCborInt(R sink, E value)
- encodeCborMap
size_t encodeCborMap(R sink, E value)
Encodes asociative array as cbor map.
- encodeCborMap
size_t encodeCborMap(R sink, A aggregate)
Encodes structs and classes as cbor map.
Note, that decoding of structs and classes from maps is not supported (yet).
- encodeCborMapHeader
size_t encodeCborMapHeader(R sink, ulong mapLength)
Undocumented in source. Be warned that the author may not have intended to support it.
- encodeCborMapHeader
size_t encodeCborMapHeader(R sink)
Undocumented in source. Be warned that the author may not have intended to support it.
- encodeCborNull
size_t encodeCborNull(R sink)
- encodeCborSimple
size_t encodeCborSimple(R sink, ubyte simple)
Encodes simple. Simple data type is essentially a number that has special meaning.
Value must lie in range [0..23] or [32..255].
- encodeCborString
size_t encodeCborString(R sink, E value)
- encodeCborStringHeader
size_t encodeCborStringHeader(R sink, ulong textLength)
Undocumented in source. Be warned that the author may not have intended to support it.
- encodeCborStringHeader
size_t encodeCborStringHeader(R sink)
Undocumented in source. Be warned that the author may not have intended to support it.
- encodeCborTag
size_t encodeCborTag(R sink, ulong value)
- encodeCborUndefined
size_t encodeCborUndefined(R sink)
- getTokenAndReset
CborToken getTokenAndReset()
Undocumented in source. Be warned that the author may not have intended to support it.
- printBufferAndReset
void printBufferAndReset()
Undocumented in source. Be warned that the author may not have intended to support it.
- printCborStream
void printCborStream(R input)
void printCborStream(R input, Sink sink, ulong numItems, string indent)
Outputs textual representation of cbor stream into sink or stdout if not provided.
- readBytes
ubyte[] readBytes(R input, ulong length)
Undocumented in source. Be warned that the author may not have intended to support it.