Skip to main content

Crate batpak_macros

Crate batpak_macros 

Source
Expand description

Proc macros for the batpak event-sourcing runtime.

This crate is pulled in transitively via batpak. Users never add it to their own Cargo.toml — the derives are already in scope via use batpak::EventPayload; or use batpak::EventSourced;.

Attribute Macros§

operation
#[operation(...)] — generate a syncbat operation descriptor + optional registration fns. Re-exported as syncbat::operation; users never name this crate. (Moved here from the former syncbat-macros crate — the family has one proc-macro crate.)

Derive Macros§

AllVariants
Derives a pub const ALL: [Self; N] slice listing every variant of a fieldless enum, in declaration order. See crates/macros/src/all_variants.rs.
Error
Derives core::fmt::Display + std::error::Error for an error enum from a per-variant #[error("...")] format literal — a thiserror-lite.
EventPayload
Derives batpak::event::EventPayload for a named-field struct.
EventSourced
Derives batpak::event::EventSourced for a named-field struct.
MultiEventReactor
Derives batpak::event::MultiReactive<Input> for a named-field struct, for use with Store::react_loop_multi (JSON) or Store::react_loop_multi_raw (msgpack).