#buffer #size #calculations

macro buf_sized_derive

Derive macros to calculate buffer sizes needed by types

1 unstable release

0.1.0 Sep 18, 2024

#6 in #calculation

29 downloads per month
Used in buf_sized

MIT license

8KB
69 lines

buf_sized_derive

Derive macros for buf_sized


lib.rs:

A library for deriving the BufSized trait.

Examples

use buf_sized_derive::BufSized;

#[derive(BufSized)]
struct Data {
    header: u8,
    num: u128,
    payload: [u8; 12],
    crc: u32,
}

Dependencies

~230–670KB
~16K SLoC