net_wire/http3/
codepoints.rs1#[repr(transparent)]
5#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
6pub struct Http3FrameType(u64);
7
8impl Http3FrameType {
9 pub const DATA: Self = Self(0x00);
11 pub const HEADERS: Self = Self(0x01);
13 pub const CANCEL_PUSH: Self = Self(0x03);
15 pub const SETTINGS: Self = Self(0x04);
17 pub const PUSH_PROMISE: Self = Self(0x05);
19 pub const GOAWAY: Self = Self(0x07);
21 pub const MAX_PUSH_ID: Self = Self(0x0d);
23
24 pub const fn new(value: u64) -> Self {
26 Self(value)
27 }
28
29 pub const fn value(self) -> u64 {
31 self.0
32 }
33}
34
35#[repr(transparent)]
37#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
38pub struct Http3SettingId(u64);
39
40impl Http3SettingId {
41 pub const QPACK_MAX_TABLE_CAPACITY: Self = Self(0x01);
43 pub const MAX_FIELD_SECTION_SIZE: Self = Self(0x06);
45 pub const QPACK_BLOCKED_STREAMS: Self = Self(0x07);
47
48 pub const fn new(value: u64) -> Self {
50 Self(value)
51 }
52
53 pub const fn value(self) -> u64 {
55 self.0
56 }
57}
58
59#[repr(transparent)]
61#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
62pub struct Http3StreamType(u64);
63
64impl Http3StreamType {
65 pub const CONTROL: Self = Self(0x00);
67 pub const PUSH: Self = Self(0x01);
69 pub const QPACK_ENCODER: Self = Self(0x02);
71 pub const QPACK_DECODER: Self = Self(0x03);
73
74 pub const fn new(value: u64) -> Self {
76 Self(value)
77 }
78
79 pub const fn value(self) -> u64 {
81 self.0
82 }
83}
84
85#[repr(transparent)]
87#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
88pub struct Http3ErrorCode(u64);
89
90impl Http3ErrorCode {
91 pub const NO_ERROR: Self = Self(0x0100);
93 pub const GENERAL_PROTOCOL_ERROR: Self = Self(0x0101);
95 pub const INTERNAL_ERROR: Self = Self(0x0102);
97 pub const STREAM_CREATION_ERROR: Self = Self(0x0103);
99 pub const CLOSED_CRITICAL_STREAM: Self = Self(0x0104);
101 pub const FRAME_UNEXPECTED: Self = Self(0x0105);
103 pub const FRAME_ERROR: Self = Self(0x0106);
105 pub const EXCESSIVE_LOAD: Self = Self(0x0107);
107 pub const ID_ERROR: Self = Self(0x0108);
109 pub const SETTINGS_ERROR: Self = Self(0x0109);
111 pub const MISSING_SETTINGS: Self = Self(0x010a);
113 pub const REQUEST_REJECTED: Self = Self(0x010b);
115 pub const REQUEST_CANCELLED: Self = Self(0x010c);
117 pub const REQUEST_INCOMPLETE: Self = Self(0x010d);
119 pub const MESSAGE_ERROR: Self = Self(0x010e);
121 pub const CONNECT_ERROR: Self = Self(0x010f);
123 pub const VERSION_FALLBACK: Self = Self(0x0110);
125 pub const QPACK_DECOMPRESSION_FAILED: Self = Self(0x0200);
127 pub const QPACK_ENCODER_STREAM_ERROR: Self = Self(0x0201);
129 pub const QPACK_DECODER_STREAM_ERROR: Self = Self(0x0202);
131
132 pub const fn new(value: u64) -> Self {
134 Self(value)
135 }
136
137 pub const fn value(self) -> u64 {
139 self.0
140 }
141}