nibblecode 0.1.0

A serialization format based on rkyv
Documentation
1
2
3
4
5
6
7
8
use crate::Serialize;

/// Serializes the given value to bytes using the test serializer, then calls
/// the given function on those bytes.
pub fn to_bytes(value: &impl Serialize, f: impl FnOnce(&mut [u8])) {
	let mut bytes = crate::to_bytes(value).expect("failed to serialize value");
	f(&mut bytes);
}