# `Examples.EEventBroker.WithSub`

I contain examples of how the `with_subscription` block works.

# `__ex_example__with_existing_subscription__`

I check that, when a process is subscribed to a given filter, that filter
still exists after a `with_subscription` block that uses the same filter.

# `__ex_example__with_nested_subscription__`

I nest two with_subscription blocks and assert that the middle one is subscribed to the outer topics as well.

# `__ex_example__with_subscription__`

I run a piece of code with a subscription. I assert that the messages sent
within this block are sent to me.

# `__ex_example__with_subscriptions__`

I run a piece of code with a subscription to multiple filters. I assert that
the messages sent within this block are sent to me.

# `copy`

# `rerun?`

# `with_existing_subscription`

```elixir
@spec with_existing_subscription(struct()) :: struct()
```

# `with_nested_subscription`

```elixir
@spec with_nested_subscription([struct()]) :: [struct()]
```

# `with_subscription`

```elixir
@spec with_subscription(struct()) :: struct()
```

# `with_subscriptions`

```elixir
@spec with_subscriptions([struct()]) :: [struct()]
```

---

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