1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
pub const MAJOR_TYPE_UNSIGNED_INT: u8 = 0x00;
pub const MAJOR_TYPE_NEGATIVE_INT: u8 = 0x20;
pub const MAJOR_TYPE_BYTE_STRING: u8 = 0x40;
pub const MAJOR_TYPE_TEXT_STRING: u8 = 0x60;
pub const MAJOR_TYPE_ARRAY: u8 = 0x80;
pub const MAJOR_TYPE_MAP: u8 = 0xa0;
pub const MAJOR_TYPE_TAG: u8 = 0xc0;
pub const MAJOR_TYPE_SIMPLE_FLOAT: u8 = 0xe0;
pub const MAJOR_TYPE_MASK: u8 = 0xe0;
pub const ADDITIONAL_INFO_1_BYTE: u8 = 24;
pub const ADDITIONAL_INFO_2_BYTES: u8 = 25;
pub const ADDITIONAL_INFO_4_BYTES: u8 = 26;
pub const ADDITIONAL_INFO_8_BYTES: u8 = 27;
pub const ADDITIONAL_INFO_INDEFINITE: u8 = 31;
pub const SIMPLE_VALUE_FALSE: u8 = 0xf4;
pub const SIMPLE_VALUE_TRUE: u8 = 0xf5;
pub const SIMPLE_VALUE_NULL: u8 = 0xf6;
pub const SIMPLE_VALUE_UNDEFINED: u8 = 0xf7;
pub const FLOAT16_MARKER: u8 = 0xf9;
pub const FLOAT32_MARKER: u8 = 0xfa;
pub const FLOAT64_MARKER: u8 = 0xfb;
/// The break stop code, which closes an indefinite-length container or string.
pub const BREAK: u8 = 0xff;
/// The tag numbers RFC 8949 Section 3.4 and RFC 8746 assign meaning to.
///
/// A tag on the wire is just a number, so these are the names for them rather
/// than a decoder: nothing here interprets the tagged value. A type that wants
/// one says so with `#[cbor(tag = N)]`, which writes the number and checks it on
/// the way back in.