# `Chronicle.EventSequences.PreparedEvent`
[🔗](https://github.com/Cratis/Chronicle.Elixir/blob/main/lib/chronicle/event_sequences/prepared_event.ex#L4)

An immutable, pre-serialized snapshot of an event, bound to the client, namespace and event
sequence that prepared it.

Create with `Chronicle.EventSequences.EventLog.prepare/2` and reuse with
`Chronicle.EventSequences.EventLog.append_prepared/3` and
`Chronicle.EventSequences.Streams.verify_content/3`. The content is serialized once, at
preparation time; later changes to the original event struct have no effect on it. Appending
a prepared event through a different client, namespace, or event sequence than the one that
prepared it returns `{:error, :prepared_event_belongs_to_another_sequence}`.

Mirrors the .NET client's `PreparedEvent` (`IEventSequence.Prepare`). Unlike .NET, single use
is not enforced - a prepared event can be appended more than once, exactly like appending the
same event struct twice.

# `owner`

```elixir
@type owner() ::
  {client :: atom(), namespace :: String.t(), event_sequence_id :: String.t()}
```

# `t`

```elixir
@type t() :: %Chronicle.EventSequences.PreparedEvent{
  content: String.t(),
  event: struct(),
  event_type: struct(),
  owner: owner()
}
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
