pinapod 0.4.3

Zero-copy pod types with derive macros. Alignment-1 representations for zero-overhead data access.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use pinapod::PinaPod;

#[derive(PinaPod)]
#[pinapod(compact, crate = pinapod)]
struct ProtectedAccount {
	#[pinapod(skip_accessor, skip_patch)]
	discriminator: [u8; 8],
	revision: u64,
	entries: pinapod::Vec<u64, 8>,
}

fn main() {
	let entries: [pinapod::pod::PodU64; 2] = [1_u64.into(), 2_u64.into()];
	let _ = ProtectedAccountPatch::new()
		.revision(3)
		.replace_entries(&entries);
}