zink

Derive Macro Event

#[derive(Event)]
Expand description

Event logging interface

use zink::Event;

/// A `Ping` event.
#[derive(Event)]
struct Ping;

#[no_mangle]
pub extern "C" fn log0() {
    Ping.log0();
}

will generate:

struct Ping;

impl zink::Event for Ping {
    const NAME: &'static [u8] = b"Ping";
}