Macro spinel_pack::spinel_write
spinel_write!() { /* proc-macro */ }
Expand description
In-line proc macro for writing spinel-formatted data fields to a type
implementing std::io::Write
.
ยงExample
let mut target: Vec<u8> = vec![];
spinel_write!(&mut target, "isc", 1, 2, 3)
.expect("spinel_write failed");
assert_eq!(target, vec![1u8,2u8,0u8,3u8]);