Function calcSize [src]
Compute the number of bytes required to serialize params
Prototype
pub fn calcSize(params: anytype) usize
Source
pub fn calcSize(params: anytype) usize {
var buf = io.countingWriter(io.null_writer);
serializeTo(params, buf.writer()) catch unreachable;
return @as(usize, @intCast(buf.bytes_written));
}