Derive Macro ic_event_hub_macros::Event
source · [−]#[derive(Event)]
{
// Attributes available to this derive:
#[topic]
}
Expand description
Generates an implementation of ic_event_hub::types::IEvent
trait for a given struct. Also generates a *Filter
struct and an implementation of ic_event_hub::types::IEventFilter
trait for that struct which can be used to filter
topics while listening to the given event.
Fields of the event struct have to implement candid::CandidType
and candid::Deserialize
Usage:
#[derive(Event)]
struct MyEvent {
...
}