macro_rules! size_hint {
(length=$length:ident, $($member:expr),+) => { ... };
($($member:expr),+) => { ... };
}Expand description
Returns the combined size hint of a series of variables.
An optional length parameter can be specified to include a length field in the size
calculations.
ยงExamples
use rsomeip_bytes::{Serialize, size_hint};
let [a, b, c, d] = [1u8, 2, 3, 4];
let mut size = 0;
size += size_hint!(a, b);
size += size_hint!(length = U32, c, d);
assert_eq!(size, 8);