110ff414cSEd MasteTypes of items 210ff414cSEd Maste=============================================== 310ff414cSEd Maste 4*abd87254SEd MasteEvery :type:`cbor_item_t` has a :type:`cbor_type` associated with it - these constants correspond to the types specified by the `CBOR standard <https://www.rfc-editor.org/info/std94>`_: 510ff414cSEd Maste 610ff414cSEd Maste.. doxygenenum:: cbor_type 710ff414cSEd Maste 810ff414cSEd MasteTo find out the type of an item, one can use 910ff414cSEd Maste 1010ff414cSEd Maste.. doxygenfunction:: cbor_typeof 1110ff414cSEd Maste 1210ff414cSEd MastePlease note the distinction between functions like :func:`cbor_isa_uint()` and :func:`cbor_is_int()`. The following functions work solely with the major type value. 1310ff414cSEd Maste 1410ff414cSEd Maste 1510ff414cSEd MasteBinary queries 1610ff414cSEd Maste------------------------ 1710ff414cSEd Maste 1810ff414cSEd MasteAlternatively, there are functions to query each particular type. 1910ff414cSEd Maste 2010ff414cSEd Maste.. warning:: Passing an invalid :type:`cbor_item_t` reference to any of these functions results in undefined behavior. 2110ff414cSEd Maste 2210ff414cSEd Maste.. doxygenfunction:: cbor_isa_uint 2310ff414cSEd Maste.. doxygenfunction:: cbor_isa_negint 2410ff414cSEd Maste.. doxygenfunction:: cbor_isa_bytestring 2510ff414cSEd Maste.. doxygenfunction:: cbor_isa_string 2610ff414cSEd Maste.. doxygenfunction:: cbor_isa_array 2710ff414cSEd Maste.. doxygenfunction:: cbor_isa_map 2810ff414cSEd Maste.. doxygenfunction:: cbor_isa_tag 2910ff414cSEd Maste.. doxygenfunction:: cbor_isa_float_ctrl 3010ff414cSEd Maste 3110ff414cSEd Maste 3210ff414cSEd MasteLogical queries 3310ff414cSEd Maste------------------------ 3410ff414cSEd Maste 3510ff414cSEd MasteThese functions provide information about the item type from a more high-level perspective 3610ff414cSEd Maste 3710ff414cSEd Maste.. doxygenfunction:: cbor_is_int 3810ff414cSEd Maste.. doxygenfunction:: cbor_is_float 3910ff414cSEd Maste.. doxygenfunction:: cbor_is_bool 4010ff414cSEd Maste.. doxygenfunction:: cbor_is_null 4110ff414cSEd Maste.. doxygenfunction:: cbor_is_undef 42