Must.Event protocol (Must v0.1.0-dev)

Copy Markdown View Source

An extensible protocol for processing commands.

Pro Tip

When defining implementations, use Keyword.fetch!/2 or a custom opts struct to standardize option handling. This way, the Elixir 1.20+ compiler can perform compile-time checks on the options and raise errors during development.

Summary

Types

t()

All the types that implement this protocol.

Functions

Pass the event to any relevant handlers.

Persist the event to a stream.

Types

t()

@type t() :: term()

All the types that implement this protocol.

Functions

be_handled!(event, opts)

Pass the event to any relevant handlers.

be_persisted!(event, opts)

Persist the event to a stream.