Behaviors¶
casty.Behavior
dataclass
¶
Minimal actor behavior primitive.
Exactly one of on_receive, on_setup, or signal is set.
on_receive = None
class-attribute
instance-attribute
¶
on_setup = None
class-attribute
instance-attribute
¶
signal = None
class-attribute
instance-attribute
¶
receive(handler)
staticmethod
¶
setup(factory)
staticmethod
¶
same()
staticmethod
¶
stopped()
staticmethod
¶
unhandled()
staticmethod
¶
restart()
staticmethod
¶
__init__(*, on_receive=None, on_setup=None, signal=None)
¶
casty.Behaviors
¶
Factory for composing behaviors from the Behavior primitive.