Derive Macro blaze_pk::PacketComponents

source ·
#[derive(PacketComponents)]
{
    // Attributes available to this derive:
    #[component]
}
Expand description

Re-exports for derive macros Macro for deriving components any enum that wants to implement PacketComponents must also implement Debug, Hash, PartialEq, and Eq these traits are required for routing

use blaze_pk::{PacketComponents, PacketComponent}

#[derive(Debug, Hash, PartialEq, Eq, PacketComponents)]
pub enum Components {
    #[component(target = 0x1)]
    Component1(Component1)
}

#[derive(Debug, Hash, PartialEq, Eq, PacketComponents)]
pub enum Component1 {
    #[command(target = 0x14)]
    Value,
    #[command(target = 0x14, notify)]
    NotifyValue,
}