Types of items

Every cbor_item_t has a cbor_type associated with it - these constants correspond to the types specified by the CBOR standard:

Warning

doxygenenum: Cannot find file: /tmp/B.5qzRfz/BUILD/libcbor-0.5.0/doc/build/doxygen/xml/index.xml

To find out the type of an item, one can use

Warning

doxygenfunction: Cannot find file: /tmp/B.5qzRfz/BUILD/libcbor-0.5.0/doc/build/doxygen/xml/index.xml

Please note the distinction between functions like cbor_isa_uint() and cbor_is_int(). The following functions work solely with the major type value.

Binary queries

Alternatively, there are functions to query each particular type.

Warning

Passing an invalid cbor_item_t reference to any of these functions results in undefined behavior.

Warning

doxygenfunction: Cannot find file: /tmp/B.5qzRfz/BUILD/libcbor-0.5.0/doc/build/doxygen/xml/index.xml

Warning

doxygenfunction: Cannot find file: /tmp/B.5qzRfz/BUILD/libcbor-0.5.0/doc/build/doxygen/xml/index.xml

Warning

doxygenfunction: Cannot find file: /tmp/B.5qzRfz/BUILD/libcbor-0.5.0/doc/build/doxygen/xml/index.xml

Warning

doxygenfunction: Cannot find file: /tmp/B.5qzRfz/BUILD/libcbor-0.5.0/doc/build/doxygen/xml/index.xml

Warning

doxygenfunction: Cannot find file: /tmp/B.5qzRfz/BUILD/libcbor-0.5.0/doc/build/doxygen/xml/index.xml

Warning

doxygenfunction: Cannot find file: /tmp/B.5qzRfz/BUILD/libcbor-0.5.0/doc/build/doxygen/xml/index.xml

Warning

doxygenfunction: Cannot find file: /tmp/B.5qzRfz/BUILD/libcbor-0.5.0/doc/build/doxygen/xml/index.xml

Warning

doxygenfunction: Cannot find file: /tmp/B.5qzRfz/BUILD/libcbor-0.5.0/doc/build/doxygen/xml/index.xml

Logical queries

These functions provide information about the item type from a more high-level perspective

Warning

doxygenfunction: Cannot find file: /tmp/B.5qzRfz/BUILD/libcbor-0.5.0/doc/build/doxygen/xml/index.xml

Warning

doxygenfunction: Cannot find file: /tmp/B.5qzRfz/BUILD/libcbor-0.5.0/doc/build/doxygen/xml/index.xml

Warning

doxygenfunction: Cannot find file: /tmp/B.5qzRfz/BUILD/libcbor-0.5.0/doc/build/doxygen/xml/index.xml

Warning

doxygenfunction: Cannot find file: /tmp/B.5qzRfz/BUILD/libcbor-0.5.0/doc/build/doxygen/xml/index.xml

Warning

doxygenfunction: Cannot find file: /tmp/B.5qzRfz/BUILD/libcbor-0.5.0/doc/build/doxygen/xml/index.xml