type_slicer_derive

Crates.iotype_slicer_derive
lib.rstype_slicer_derive
version0.1.0
created_at2025-12-06 10:15:00.96671+00
updated_at2025-12-06 10:15:00.96671+00
descriptiontype_slicer::ByteRepr の derive マクロ
homepage
repository
max_upload_size
id1969936
size30,763
ShizukaKokoro (ShizukaKokoro)

documentation

README

type_slicer_derive

type_slicer_derivetype_slicer::repr::ByteRepr を構造体・列挙型に自動実装するための派生マクロをまとめるプロシージャルマクロクレートです。 型ごとに ByteRepr を手書きする作業を排除し、type_slicer が提供するスライサーとシリアライズ周りの API をそのままユーザー定義型に適用できるようにすることを目的としています。

位置付け

  • コアロジックは type_slicer クレートにあります。本クレートはその補助として #[derive(ByteRepr)] を提供し、repr.rs で定義されている ByteRepr トレイト実装を生成します。

#[derive(ByteRepr)] はこのシグネチャに沿って、フィールドごとに ByteRepr を委譲した実装を生成します。結果として、手作業での SIZE 計算や into_bytes/from_bytes のマニュアル配線を省略できます。

Commit count: 0

cargo fmt