Macro event_store_conformance
macro_rules! event_store_conformance {
(mod_name = $mod_name:ident, emit = $emit:path, fixture = $fixture:expr) => { ... };
(mod_name = $mod_name:ident, fixture = $fixture:expr) => { ... };
($fixture:expr) => { ... };
}Expand description
Generates the full DCB conformance suite for an event store adapter.
Takes an expression that produces a Fixture — one isolated backing store
per instance. See the crate documentation for what is checked and
what the adapter must provide.
It is an expression rather than a type deliberately, and the awkward case is the one that decides it: a Postgres fixture needs a connection URL, and a type with an argument-less constructor would have to reach into the environment for it.
The rule list is not written here; it comes from
for_each_event_store_rule!, which is
the only place it is written at all.
§Examples
use happenstance_testkit::fixtures::MemoryFixture;
happenstance_testkit::event_store_conformance!(MemoryFixture::new());Choosing a different harness — the emitter is a parameter, so the testkit never decides which async runtime an adapter is tested on:
happenstance_testkit::event_store_conformance!(
mod_name = blocking_conformance,
emit = happenstance_testkit::emit_blocking,
fixture = MemoryFixture::new()
);§Migrating from factory =
The keyword was factory = and took a store expression. There is no
deprecated arm: factory = was introduced at 23fd446 and removed at
1c1a6b7, eight days before this crate was first published at
0.2.0-alpha.1 on 2026-08-16, so no published version ever accepted it.
Change the keyword and hand it a Fixture instead of a store.