Macro evident::create_set_event_macro
source · macro_rules! create_set_event_macro { (id_type = $id_t:ty, msg_type = $msg_t:ty, entry_type = $entry_t:ty, interm_event_type = $interm_event_t:ty ) => { ... }; (no_export, id_type = $id_t:ty, msg_type = $msg_t:ty, entry_type = $entry_t:ty, interm_event_type = $interm_event_t:ty ) => { ... }; }
Expand description
Macro to create the set_event!()
macro for a concrete implementation.
Usage
In the following example, text between <>
is used as placeholder.
no_export,
may be set at the beginning to prevent #[macro_export]
from being added.
Note: Set fully qualified paths for the types to make the macro accessible from anywhere.
evident::create_set_event_macro!(
id_type = <Struct implementing `evident::publisher::Id`>,
entry_type = <Struct implementing `evident::event::EventEntry`>,
interm_event_type = <Struct implementing `evident::event::IntermediaryEvent`>
);
Example with dummy implementations:
evident::create_set_event_macro!(
id_type = my_crate::my_mod::MyId,
entry_type = my_crate::my_mod::MyEventEntry,
interm_event_type = my_crate::my_mod::MyInterimEvent
);
Example with no export:
evident::create_set_event_macro!(
no_export,
id_type = my_crate::my_mod::MyId,
entry_type = my_crate::my_mod::MyEventEntry,
interm_event_type = my_crate::my_mod::MyInterimEvent
);
[req:qa.ux.macros]