Reaxive.Subscription.State

Encapsulates the internal state of subscriptions and implements all functions of the family of subscription (simple, composite, and multi-assign).

Source

Summary

add(state, sub)
assign(state, sub)
delete(state, sub)
embedded(state)
is_unsubscribed?(state)
robust_call(default_value, list)

This macro allows the call to an GenServer. If the process does not exist, then the default value is returned

start(disp_fun, embedded \\ nil)
unsubscribe(s)

Types

t :: %Reaxive.Subscription.State{active: term, dispose_fun: term, embedded_sub: term}

Functions

add(state, sub)

Specs:

Source
assign(state, sub)

Specs:

Source
delete(state, sub)

Specs:

Source
embedded(state)

Specs:

Source
is_unsubscribed?(state)
Source
start(disp_fun, embedded \\ nil)
Source
unsubscribe(s)

Specs:

  • unsubscribe(t) :: {:ok, t}
Source

Macros

robust_call(default_value, list)

This macro allows the call to an GenServer. If the process does not exist, then the default value is returned.

This macros is provided to implement subscriptions easier.

Source