mule/notifiers/isolated
Types
pub type Message {
Listen(
channel: notifier.Channel,
subscriber: process.Subject(notifier.Notification),
)
Unlisten(
channel: notifier.Channel,
subscriber: process.Subject(notifier.Notification),
)
Notify(notification: notifier.Notification)
SubscriberDown(down: process.Down)
}
Constructors
-
Listen( channel: notifier.Channel, subscriber: process.Subject(notifier.Notification), ) -
Unlisten( channel: notifier.Channel, subscriber: process.Subject(notifier.Notification), ) -
Notify(notification: notifier.Notification) -
SubscriberDown(down: process.Down)
pub type State {
State(
subscribers: dict.Dict(
notifier.Channel,
set.Set(process.Subject(notifier.Notification)),
),
monitors: dict.Dict(process.Pid, process.Monitor),
)
}
Constructors
-
State( subscribers: dict.Dict( notifier.Channel, set.Set(process.Subject(notifier.Notification)), ), monitors: dict.Dict(process.Pid, process.Monitor), )
Values
pub fn child(
name: process.Name(Message),
) -> supervision.ChildSpecification(Nil)
A supervisor child spec that starts this notifier registered under name,
erasing the started subject to Nil (supervised siblings resolve it by
name). Pair it with new(process.named_subject(name)) to build the
Notifier the runtime consumes — mule.start supervises this child.
pub fn new(
subject: process.Subject(Message),
) -> notifier.Notifier
pub fn start() -> Result(
actor.Started(process.Subject(Message)),
actor.StartError,
)
pub fn start_named(
name: process.Name(Message),
) -> Result(
actor.Started(process.Subject(Message)),
actor.StartError,
)