blob: 825f0f2bed24343f0d8803aff8bd51af18d9dcd5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
use zerocopy_derive::*;
#[path = "formats/coco_dynamic_size.rs"]
mod format;
#[derive(IntoBytes, KnownLayout, Immutable)]
#[repr(C, align(2))]
struct MinimalViableSource {
header: [u8; 6],
trailer: [[u8; 2]],
}
#[unsafe(no_mangle)]
fn bench_transmute_ref_dynamic_size(source: &MinimalViableSource) -> &format::LocoPacket {
zerocopy::transmute_ref!(source)
}
|