macro_rules! beve_object {
(write_only :: $($t:tt)*) => { ... };
(read_only $($t:tt)*) => { ... };
(write_only $($t:tt)*) => { ... };
($($t:tt)*) => { ... };
}Expand description
Declare a struct’s schema for BEVE alone.
The counterpart of json_object!. A struct with a borrowed &[u8] field
needs this one: JSON has no way to hand back a run of bytes out of a
document, so there is no JSON impl to generate.
#[derive(Default)]
struct Frame<'a> {
id: u32,
payload: &'a [u8],
}
structio::beve_object!(['a] Frame<'a> { id, payload });