We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
parse_into_structs
1 parent 149be6b commit ce70516Copy full SHA for ce70516
blobby/src/decode.rs
@@ -225,6 +225,22 @@ macro_rules! parse_into_structs {
225
pub $($field : &'static [u8]),*
226
}
227
228
+ $crate::parse_into_structs!(
229
+ $data;
230
+ $static_vis static $items_name;
231
+ existing struct $item {
232
+ $($field),*
233
+ }
234
+ );
235
+ };
236
+
237
+ (
238
+ $data:expr;
239
+ $static_vis:vis static $items_name:ident;
240
+ existing struct $item:ident {
241
+ $($field:ident),* $(,)?
242
243
+ ) => {
244
$static_vis static $items_name: &[$item] = {
245
const RAW_ITEMS: &[&[u8]] = $crate::parse_into_slice!($data);
246
0 commit comments