#[derive(TypeStructCodec)]
{
// Attributes available to this derive:
#[type_struct_codec]
}
Expand description
Derives [mcproto_types::TypeCodec] for a protocol structure.
Fields are encoded and decoded in declaration order. A codec kind must be supplied so errors from individual fields retain the enclosing structure:
ⓘ
#[derive(TypeStructCodec)]
#[type_struct_codec(kind = Slot)]
struct Item {
id: VarInt,
count: VarInt,
}