reactive_signal/signal
Types
Functions
pub fn from_channel(chn: Channel(a)) -> Signal(a)
pub fn subscribe(
signal: Signal(a),
new_subscriber: fn(a) -> Nil,
) -> Nil
Subscribe to a channel Subscriber is start as a new process, and exit when the next value is published, or parent process is exit.
pub fn subscribe_from_subject(
signal: Signal(a),
subscriber_subject: Subject(a),
) -> Nil
Subscribe to a channel by Subject. Subject will receive messages when the channel value is updated.
pub fn subscribe_with_wait_next(
signal: Signal(a),
new_subscriber: fn(a, fn() -> Nil) -> Nil,
) -> Nil
Subscribe to a channel with a wait_next function, that will wait for the next value to be published.