Skip to main content

Crate re_byte_size_derive

Crate re_byte_size_derive 

Source
Expand description

Derive macro for the SizeBytes trait from re_byte_size.

use ::re_byte_size::SizeBytes;
use re_byte_size_derive::SizeBytes;

#[derive(SizeBytes)]
struct Foo {
    name: String,
    values: Vec<u32>,

    #[size_bytes(ignore)]
    cache: Vec<u8>,
}

Derive Macros§

SizeBytes
Derives SizeBytes for a struct or enum.