Debian Codegraph @

src/hwdb/trie/header.rs

raw symbols SCIP
1 use stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::memrust-analyzer cargo core https://github.com/rust-lang/rust/library/core mem/;
2
3 use craterust-analyzer cargo udevrs 0.4.0 crate/::{Errorrust-analyzer cargo udevrs 0.4.0 error/Error#, Resultrust-analyzer cargo udevrs 0.4.0 error/Result#};
4
5 use superrust-analyzer cargo udevrs 0.4.0 hwdb/trie/::{HWDB_SIGrust-analyzer cargo udevrs 0.4.0 hwdb/trie/HWDB_SIG., HWDB_SIG_STRrust-analyzer cargo udevrs 0.4.0 hwdb/trie/HWDB_SIG_STR.};
6
7 /// On-disk trie objects
8 #[repr(C, packed(8))]
9 #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:, Copyrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Copy:, Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/macros/Debug:, Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default:, PartialEqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq:)]
10 pub struct TrieHeaderrust-analyzer cargo udevrs 0.4.0 hwdb/trie/header/TrieHeader# {
11 signaturerust-analyzer cargo udevrs 0.4.0 hwdb/trie/header/TrieHeader#signature.: [u8; 8],
12 tool_versionrust-analyzer cargo udevrs 0.4.0 hwdb/trie/header/TrieHeader#tool_version.: u64,
13 file_sizerust-analyzer cargo udevrs 0.4.0 hwdb/trie/header/TrieHeader#file_size.: u64,
14 header_sizerust-analyzer cargo udevrs 0.4.0 hwdb/trie/header/TrieHeader#header_size.: u64,
15 node_sizerust-analyzer cargo udevrs 0.4.0 hwdb/trie/header/TrieHeader#node_size.: u64,
16 child_entry_sizerust-analyzer cargo udevrs 0.4.0 hwdb/trie/header/TrieHeader#child_entry_size.: u64,
17 value_entry_sizerust-analyzer cargo udevrs 0.4.0 hwdb/trie/header/TrieHeader#value_entry_size.: u64,
18 nodes_root_offrust-analyzer cargo udevrs 0.4.0 hwdb/trie/header/TrieHeader#nodes_root_off.: u64,
19 nodes_lenrust-analyzer cargo udevrs 0.4.0 hwdb/trie/header/TrieHeader#nodes_len.: u64,
20 strings_lenrust-analyzer cargo udevrs 0.4.0 hwdb/trie/header/TrieHeader#strings_len.: u64,
21 }
22
23 impl TrieHeaderrust-analyzer cargo udevrs 0.4.0 hwdb/trie/header/TrieHeader# {
24 /// Creates a new [TrieHeader].
25 pub const fn newrust-analyzer cargo udevrs 0.4.0 hwdb/trie/header/impl#[TrieHeader]new().() -> Selfrust-analyzer cargo udevrs 0.4.0 hwdb/trie/header/impl#[TrieHeader] {
26 Selfrust-analyzer cargo udevrs 0.4.0 hwdb/trie/header/impl#[TrieHeader] {
27 signaturerust-analyzer cargo udevrs 0.4.0 hwdb/trie/header/TrieHeader#signature.: HWDB_SIGrust-analyzer cargo udevrs 0.4.0 hwdb/trie/HWDB_SIG.,
28 tool_versionrust-analyzer cargo udevrs 0.4.0 hwdb/trie/header/TrieHeader#tool_version.: 0,
29 file_sizerust-analyzer cargo udevrs 0.4.0 hwdb/trie/header/TrieHeader#file_size.: 0,
30 header_sizerust-analyzer cargo udevrs 0.4.0 hwdb/trie/header/TrieHeader#header_size.: 0,
31 node_sizerust-analyzer cargo udevrs 0.4.0 hwdb/trie/header/TrieHeader#node_size.: 0,
32 child_entry_sizerust-analyzer cargo udevrs 0.4.0 hwdb/trie/header/TrieHeader#child_entry_size.: 0,
33 value_entry_sizerust-analyzer cargo udevrs 0.4.0 hwdb/trie/header/TrieHeader#value_entry_size.: 0,
34 nodes_root_offrust-analyzer cargo udevrs 0.4.0 hwdb/trie/header/TrieHeader#nodes_root_off.: 0,
35 nodes_lenrust-analyzer cargo udevrs 0.4.0 hwdb/trie/header/TrieHeader#nodes_len.: 0,
36 strings_lenrust-analyzer cargo udevrs 0.4.0 hwdb/trie/header/TrieHeader#strings_len.: 0,
37 }
38 }
39
40 /// Gets the [TrieHeader] object signature.
41 pub fn signaturerust-analyzer cargo udevrs 0.4.0 hwdb/trie/header/impl#[TrieHeader]signature().(&self) -> &str {
42 stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::strrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc str/::from_utf8rust-analyzer cargo core https://github.com/rust-lang/rust/library/core str/converts/from_utf8().(self.signaturerust-analyzer cargo udevrs 0.4.0 hwdb/trie/header/TrieHeader#signature..as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`AsRef<[T]>`]as_ref().()).unwrap_orrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap_or().("")
43 }
44
45 /// Version of the tool which created the file.
46 pub const fn tool_versionrust-analyzer cargo udevrs 0.4.0 hwdb/trie/header/impl#[TrieHeader]tool_version().(&self) -> u64 {
47 self.tool_versionrust-analyzer cargo udevrs 0.4.0 hwdb/trie/header/TrieHeader#tool_version.
48 }
49
50 /// Sets the version of the tool which created the file.
51 pub fn set_tool_versionrust-analyzer cargo udevrs 0.4.0 hwdb/trie/header/impl#[TrieHeader]set_tool_version().(&mut self, val: u64) {
52 self.tool_versionrust-analyzer cargo udevrs 0.4.0 hwdb/trie/header/TrieHeader#tool_version. = val;
53 }
54
55 /// Builder function that sets the version of the tool which created the file.
56 pub fn with_tool_versionrust-analyzer cargo udevrs 0.4.0 hwdb/trie/header/impl#[TrieHeader]with_tool_version().(mut self, val: u64) -> Selfrust-analyzer cargo udevrs 0.4.0 hwdb/trie/header/impl#[TrieHeader] {
57 self.set_tool_versionrust-analyzer cargo udevrs 0.4.0 hwdb/trie/header/impl#[TrieHeader]set_tool_version().(val);
58 self
59 }
60
61 /// Gets the file size of the database file.
62 pub const fn file_sizerust-analyzer cargo udevrs 0.4.0 hwdb/trie/header/impl#[TrieHeader]file_size().(&self) -> u64 {
63 self.file_sizerust-analyzer cargo udevrs 0.4.0 hwdb/trie/header/TrieHeader#file_size.
64 }
65
66 /// Sets the file size of the database file.
67 pub fn set_file_sizerust-analyzer cargo udevrs 0.4.0 hwdb/trie/header/impl#[TrieHeader]set_file_size().(&mut self, val: u64) {
68 self.file_sizerust-analyzer cargo udevrs 0.4.0 hwdb/trie/header/TrieHeader#file_size. = val;
69 }
70
71 /// Builder function that sets the file size of the database file.
72 pub fn with_file_sizerust-analyzer cargo udevrs 0.4.0 hwdb/trie/header/impl#[TrieHeader]with_file_size().(mut self, val: u64) -> Selfrust-analyzer cargo udevrs 0.4.0 hwdb/trie/header/impl#[TrieHeader] {
73 self.set_file_sizerust-analyzer cargo udevrs 0.4.0 hwdb/trie/header/impl#[TrieHeader]set_file_size().(val);
74 self
75 }
76
77 /// Gets the header size of the [TrieHeader].
78 pub const fn header_sizerust-analyzer cargo udevrs 0.4.0 hwdb/trie/header/impl#[TrieHeader]header_size().(&self) -> u64 {
79 self.header_sizerust-analyzer cargo udevrs 0.4.0 hwdb/trie/header/TrieHeader#header_size.
80 }
81
82 /// Sets the header size of the [TrieHeader].
83 pub fn set_header_sizerust-analyzer cargo udevrs 0.4.0 hwdb/trie/header/impl#[TrieHeader]set_header_size().(&mut self, val: u64) {
84 self.header_sizerust-analyzer cargo udevrs 0.4.0 hwdb/trie/header/TrieHeader#header_size. = val;
85 }
86
87 /// Builder function that sets the header size of the [TrieHeader].
88 pub fn with_header_sizerust-analyzer cargo udevrs 0.4.0 hwdb/trie/header/impl#[TrieHeader]with_header_size().(mut self, val: u64) -> Selfrust-analyzer cargo udevrs 0.4.0 hwdb/trie/header/impl#[TrieHeader] {
89 self.set_header_sizerust-analyzer cargo udevrs 0.4.0 hwdb/trie/header/impl#[TrieHeader]set_header_size().(val);
90 self
91 }
92
93 /// Gets the node size of the database file.
94 pub const fn node_sizerust-analyzer cargo udevrs 0.4.0 hwdb/trie/header/impl#[TrieHeader]node_size().(&self) -> u64 {
95 self.node_sizerust-analyzer cargo udevrs 0.4.0 hwdb/trie/header/TrieHeader#node_size.
96 }
97
98 /// Sets the node size of the database file.
99 pub fn set_node_sizerust-analyzer cargo udevrs 0.4.0 hwdb/trie/header/impl#[TrieHeader]set_node_size().(&mut self, val: u64) {
100 self.node_sizerust-analyzer cargo udevrs 0.4.0 hwdb/trie/header/TrieHeader#node_size. = val;
101 }
102
103 /// Builder function that sets the node size of the database file.
104 pub fn with_node_sizerust-analyzer cargo udevrs 0.4.0 hwdb/trie/header/impl#[TrieHeader]with_node_size().(mut self, val: u64) -> Selfrust-analyzer cargo udevrs 0.4.0 hwdb/trie/header/impl#[TrieHeader] {
105 self.set_node_sizerust-analyzer cargo udevrs 0.4.0 hwdb/trie/header/impl#[TrieHeader]set_node_size().(val);
106 self
107 }
108
109 /// Gets the child entry size of the database file.
110 pub const fn child_entry_sizerust-analyzer cargo udevrs 0.4.0 hwdb/trie/header/impl#[TrieHeader]child_entry_size().(&self) -> u64 {
111 self.child_entry_sizerust-analyzer cargo udevrs 0.4.0 hwdb/trie/header/TrieHeader#child_entry_size.
112 }
113
114 /// Sets the child entry size of the database file.
115 pub fn set_child_entry_sizerust-analyzer cargo udevrs 0.4.0 hwdb/trie/header/impl#[TrieHeader]set_child_entry_size().(&mut self, val: u64) {
116 self.child_entry_sizerust-analyzer cargo udevrs 0.4.0 hwdb/trie/header/TrieHeader#child_entry_size. = val;
117 }
118
119 /// Builder function that sets child entry size of the database file.
120 pub fn with_child_entry_sizerust-analyzer cargo udevrs 0.4.0 hwdb/trie/header/impl#[TrieHeader]with_child_entry_size().(mut self, val: u64) -> Selfrust-analyzer cargo udevrs 0.4.0 hwdb/trie/header/impl#[TrieHeader] {
121 self.set_child_entry_sizerust-analyzer cargo udevrs 0.4.0 hwdb/trie/header/impl#[TrieHeader]set_child_entry_size().(val);
122 self
123 }
124
125 /// Gets the value entry size of the database file.
126 pub const fn value_entry_sizerust-analyzer cargo udevrs 0.4.0 hwdb/trie/header/impl#[TrieHeader]value_entry_size().(&self) -> u64 {
127 self.value_entry_sizerust-analyzer cargo udevrs 0.4.0 hwdb/trie/header/TrieHeader#value_entry_size.
128 }
129
130 /// Sets the value entry size of the database file.
131 pub fn set_value_entry_sizerust-analyzer cargo udevrs 0.4.0 hwdb/trie/header/impl#[TrieHeader]set_value_entry_size().(&mut self, val: u64) {
132 self.value_entry_sizerust-analyzer cargo udevrs 0.4.0 hwdb/trie/header/TrieHeader#value_entry_size. = val;
133 }
134
135 /// Builder function that sets value entry size of the database file.
136 pub fn with_value_entry_sizerust-analyzer cargo udevrs 0.4.0 hwdb/trie/header/impl#[TrieHeader]with_value_entry_size().(mut self, val: u64) -> Selfrust-analyzer cargo udevrs 0.4.0 hwdb/trie/header/impl#[TrieHeader] {
137 self.set_value_entry_sizerust-analyzer cargo udevrs 0.4.0 hwdb/trie/header/impl#[TrieHeader]set_value_entry_size().(val);
138 self
139 }
140
141 /// Gets the offset of the root trie node.
142 pub const fn nodes_root_offrust-analyzer cargo udevrs 0.4.0 hwdb/trie/header/impl#[TrieHeader]nodes_root_off().(&self) -> u64 {
143 self.nodes_root_offrust-analyzer cargo udevrs 0.4.0 hwdb/trie/header/TrieHeader#nodes_root_off.
144 }
145
146 /// Sets the offset of the root trie node.
147 pub fn set_nodes_root_offrust-analyzer cargo udevrs 0.4.0 hwdb/trie/header/impl#[TrieHeader]set_nodes_root_off().(&mut self, val: u64) {
148 self.nodes_root_offrust-analyzer cargo udevrs 0.4.0 hwdb/trie/header/TrieHeader#nodes_root_off. = val;
149 }
150
151 /// Builder function that sets the offset of the root trie node.
152 pub fn with_nodes_root_offrust-analyzer cargo udevrs 0.4.0 hwdb/trie/header/impl#[TrieHeader]with_nodes_root_off().(mut self, val: u64) -> Selfrust-analyzer cargo udevrs 0.4.0 hwdb/trie/header/impl#[TrieHeader] {
153 self.set_nodes_root_offrust-analyzer cargo udevrs 0.4.0 hwdb/trie/header/impl#[TrieHeader]set_nodes_root_off().(val);
154 self
155 }
156
157 /// Gets the size of the nodes section.
158 pub const fn nodes_lenrust-analyzer cargo udevrs 0.4.0 hwdb/trie/header/impl#[TrieHeader]nodes_len().(&self) -> u64 {
159 self.nodes_lenrust-analyzer cargo udevrs 0.4.0 hwdb/trie/header/TrieHeader#nodes_len.
160 }
161
162 /// Sets the size of the nodes section.
163 pub fn set_nodes_lenrust-analyzer cargo udevrs 0.4.0 hwdb/trie/header/impl#[TrieHeader]set_nodes_len().(&mut self, val: u64) {
164 self.nodes_lenrust-analyzer cargo udevrs 0.4.0 hwdb/trie/header/TrieHeader#nodes_len. = val;
165 }
166
167 /// Builder function that sets the size of the nodes section.
168 pub fn with_nodes_lenrust-analyzer cargo udevrs 0.4.0 hwdb/trie/header/impl#[TrieHeader]with_nodes_len().(mut self, val: u64) -> Selfrust-analyzer cargo udevrs 0.4.0 hwdb/trie/header/impl#[TrieHeader] {
169 self.set_nodes_lenrust-analyzer cargo udevrs 0.4.0 hwdb/trie/header/impl#[TrieHeader]set_nodes_len().(val);
170 self
171 }
172
173 /// Gets the size of the strings section.
174 pub const fn strings_lenrust-analyzer cargo udevrs 0.4.0 hwdb/trie/header/impl#[TrieHeader]strings_len().(&self) -> u64 {
175 self.strings_lenrust-analyzer cargo udevrs 0.4.0 hwdb/trie/header/TrieHeader#strings_len.
176 }
177
178 /// Sets the size of the strings section.
179 pub fn set_strings_lenrust-analyzer cargo udevrs 0.4.0 hwdb/trie/header/impl#[TrieHeader]set_strings_len().(&mut self, val: u64) {
180 self.strings_lenrust-analyzer cargo udevrs 0.4.0 hwdb/trie/header/TrieHeader#strings_len. = val;
181 }
182
183 /// Builder function that sets the size of the strings section.
184 pub fn with_strings_lenrust-analyzer cargo udevrs 0.4.0 hwdb/trie/header/impl#[TrieHeader]with_strings_len().(mut self, val: u64) -> Selfrust-analyzer cargo udevrs 0.4.0 hwdb/trie/header/impl#[TrieHeader] {
185 self.set_strings_lenrust-analyzer cargo udevrs 0.4.0 hwdb/trie/header/impl#[TrieHeader]set_strings_len().(val);
186 self
187 }
188 }
189
190 impl TryFromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/TryFrom#<&[u8]> for TrieHeaderrust-analyzer cargo udevrs 0.4.0 hwdb/trie/header/TrieHeader# {
191 type Errorrust-analyzer cargo udevrs 0.4.0 hwdb/trie/header/impl#[TrieHeader][`TryFrom<&[u8]>`]Error# = Errorrust-analyzer cargo udevrs 0.4.0 error/Error#;
192
193 fn try_fromrust-analyzer cargo udevrs 0.4.0 hwdb/trie/header/impl#[TrieHeader][`TryFrom<&[u8]>`]try_from().(val: &[u8]) -> Resultrust-analyzer cargo udevrs 0.4.0 error/Result#<Selfrust-analyzer cargo udevrs 0.4.0 hwdb/trie/header/impl#[TrieHeader][`TryFrom<&[u8]>`]> {
194 if val.lenrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]len().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]lt().memrust-analyzer cargo core https://github.com/rust-lang/rust/library/core mem/::size_ofrust-analyzer cargo core https://github.com/rust-lang/rust/library/core mem/size_of().::<Selfrust-analyzer cargo udevrs 0.4.0 hwdb/trie/header/impl#[TrieHeader][`TryFrom<&[u8]>`]>() {
195 Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(Errorrust-analyzer cargo udevrs 0.4.0 error/Error#::InvalidLenrust-analyzer cargo udevrs 0.4.0 error/Error#InvalidLen#(val.lenrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]len().()))
196 } else {
197 let mut idx = 0usize;
198
199 let signature: [u8; 8] = val[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().idx..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#idx rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().8]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index()..try_intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/impl#[T][`TryInto<U>`]try_into().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
200
201 if signature rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/equality/impl#[`[T; N]`][`PartialEq<[U; N]>`]ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/equality/impl#[`[T; N]`][`PartialEq<[U; N]>`]ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/equality/impl#[`[T; N]`][`PartialEq<[U; N]>`]ne().HWDB_SIGrust-analyzer cargo udevrs 0.4.0 hwdb/trie/HWDB_SIG. {
202 let sig_str = stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::strrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc str/::from_utf8rust-analyzer cargo core https://github.com/rust-lang/rust/library/core str/converts/from_utf8().(signature.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`AsRef<[T]>`]as_ref().()).unwrap_orrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap_or().("");
203 Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(Errorrust-analyzer cargo udevrs 0.4.0 error/Error#::UdevHwdbrust-analyzer cargo udevrs 0.4.0 error/Error#UdevHwdb#(formatrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/format!!(
204 "invalid HWDB signature, have: {sig_str}, expected: {HWDB_SIG_STR}"
205 )))
206 } else {
207 idx rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`AddAssign<Self>`]add_assign().signature.lenrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]len().();
208
209 let tool_version = u64::from_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u64]from_le_bytes().(val[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().idx..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#idx rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().8]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index()..try_intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/TryInto#try_into().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/try_trait/Try#branch().);
210 idx rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`AddAssign<Self>`]add_assign().memrust-analyzer cargo core https://github.com/rust-lang/rust/library/core mem/::size_ofrust-analyzer cargo core https://github.com/rust-lang/rust/library/core mem/size_of().::<u64>();
211
212 let file_size = u64::from_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u64]from_le_bytes().(val[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().idx..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#idx rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().8]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index()..try_intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/TryInto#try_into().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/try_trait/Try#branch().);
213 idx rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`AddAssign<Self>`]add_assign().memrust-analyzer cargo core https://github.com/rust-lang/rust/library/core mem/::size_ofrust-analyzer cargo core https://github.com/rust-lang/rust/library/core mem/size_of().::<u64>();
214
215 let header_size = u64::from_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u64]from_le_bytes().(val[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().idx..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#idx rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().8]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index()..try_intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/TryInto#try_into().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/try_trait/Try#branch().);
216 idx rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`AddAssign<Self>`]add_assign().memrust-analyzer cargo core https://github.com/rust-lang/rust/library/core mem/::size_ofrust-analyzer cargo core https://github.com/rust-lang/rust/library/core mem/size_of().::<u64>();
217
218 let node_size = u64::from_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u64]from_le_bytes().(val[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().idx..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#idx rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().8]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index()..try_intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/TryInto#try_into().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/try_trait/Try#branch().);
219 idx rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`AddAssign<Self>`]add_assign().memrust-analyzer cargo core https://github.com/rust-lang/rust/library/core mem/::size_ofrust-analyzer cargo core https://github.com/rust-lang/rust/library/core mem/size_of().::<u64>();
220
221 let child_entry_size = u64::from_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u64]from_le_bytes().(val[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().idx..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#idx rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().8]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index()..try_intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/TryInto#try_into().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/try_trait/Try#branch().);
222 idx rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`AddAssign<Self>`]add_assign().memrust-analyzer cargo core https://github.com/rust-lang/rust/library/core mem/::size_ofrust-analyzer cargo core https://github.com/rust-lang/rust/library/core mem/size_of().::<u64>();
223
224 let value_entry_size = u64::from_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u64]from_le_bytes().(val[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().idx..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#idx rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().8]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index()..try_intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/TryInto#try_into().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/try_trait/Try#branch().);
225 idx rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`AddAssign<Self>`]add_assign().memrust-analyzer cargo core https://github.com/rust-lang/rust/library/core mem/::size_ofrust-analyzer cargo core https://github.com/rust-lang/rust/library/core mem/size_of().::<u64>();
226
227 let nodes_root_off = u64::from_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u64]from_le_bytes().(val[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().idx..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#idx rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().8]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index()..try_intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/TryInto#try_into().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/try_trait/Try#branch().);
228 idx rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`AddAssign<Self>`]add_assign().memrust-analyzer cargo core https://github.com/rust-lang/rust/library/core mem/::size_ofrust-analyzer cargo core https://github.com/rust-lang/rust/library/core mem/size_of().::<u64>();
229
230 let nodes_len = u64::from_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u64]from_le_bytes().(val[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().idx..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#idx rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().8]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index()..try_intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/TryInto#try_into().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/try_trait/Try#branch().);
231 idx rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`AddAssign<Self>`]add_assign().memrust-analyzer cargo core https://github.com/rust-lang/rust/library/core mem/::size_ofrust-analyzer cargo core https://github.com/rust-lang/rust/library/core mem/size_of().::<u64>();
232
233 let strings_len = u64::from_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u64]from_le_bytes().(val[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().idx..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#idx rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().8]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index()..try_intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/TryInto#try_into().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/try_trait/Try#branch().);
234
235 Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(Selfrust-analyzer cargo udevrs 0.4.0 hwdb/trie/header/impl#[TrieHeader][`TryFrom<&[u8]>`] {
236 signaturerust-analyzer cargo udevrs 0.4.0 hwdb/trie/header/TrieHeader#signature.,
237 tool_versionrust-analyzer cargo udevrs 0.4.0 hwdb/trie/header/TrieHeader#tool_version.,
238 file_sizerust-analyzer cargo udevrs 0.4.0 hwdb/trie/header/TrieHeader#file_size.,
239 header_sizerust-analyzer cargo udevrs 0.4.0 hwdb/trie/header/TrieHeader#header_size.,
240 node_sizerust-analyzer cargo udevrs 0.4.0 hwdb/trie/header/TrieHeader#node_size.,
241 child_entry_sizerust-analyzer cargo udevrs 0.4.0 hwdb/trie/header/TrieHeader#child_entry_size.,
242 value_entry_sizerust-analyzer cargo udevrs 0.4.0 hwdb/trie/header/TrieHeader#value_entry_size.,
243 nodes_root_offrust-analyzer cargo udevrs 0.4.0 hwdb/trie/header/TrieHeader#nodes_root_off.,
244 nodes_lenrust-analyzer cargo udevrs 0.4.0 hwdb/trie/header/TrieHeader#nodes_len.,
245 strings_lenrust-analyzer cargo udevrs 0.4.0 hwdb/trie/header/TrieHeader#strings_len.,
246 })
247 }
248 }
249 }
250 }