Attribute Macro spinel_pack::spinel_packed

#[spinel_packed]
Expand description

Attribute macro which takes a Spinel format string as an argument and automatically defines the TryPack/TryUnpack traits for the given struct.

The full list of traits implemented by this macro include:

  • TryPack/TryUnpack
  • TryPackAs<SpinelDataWlen>/TryUnpackAs<SpinelDataWlen>
  • TryPackAs<[u8]>/TryUnpackAs<[u8]>

Additionally, if no lifetimes are specified, the following trait is also implemented:

  • TryOwnedUnpack

Attribute macro which takes a Spinel format string as an argument and automatically defines the TryPack/TryUnpack traits for the given struct.

The full list of traits implemented by this macro include:

  • TryPack/TryUnpack
  • TryPackAs<SpinelDataWlen>/TryUnpackAs<SpinelDataWlen>
  • TryPackAs<[u8]>/TryUnpackAs<[u8]>

Additionally, if no lifetimes are specified, the following trait is also implemented:

  • TryOwnedUnpack