#[derive(Encode)]
{
// Attributes available to this derive:
#[musli]
}
Expand description
Derive which automatically implements the Encode trait.
See the derives module for detailed documentation.
ยงExamples
use musli::Encode;
#[derive(Encode)]
struct MyType {
data: [u8; 128],
}When using through musli_core, the crate needs to be specified:
use musli_core::Encode;
#[derive(Encode)]
#[musli(crate = musli_core)]
struct MyType {
data: [u8; 128],
}