[−][src]Trait d3_core::machine_impl::Machine
The machine is the common trait all machines must implement and describes how instuctions are delivered to a machine, via the receive method.
Required methods
fn receive(&self, cmd: T)
The receive method receives instructions sent to it by itself or other machines.
Provided methods
fn disconnected(&self)
The disconnected method is called to notify the machine that its receiver has become disconnect; it will no longer receive instructions. This could be a result of server shutdown, or all senders dropping their senders.
fn connected(&self, _uuid: Uuid)
The connected method is called once, before receive messages. It provides a notification that the machine has become connected and may receive instructions. It includes a Uuid for the machine, which may be used in logging. A machine implementing several instruction sets will receive a differnt Uuid for each instruction set implemented.
Implementations on Foreign Types
impl<T, P> Machine<P> for Mutex<T> where
T: Machine<P>,
P: MachineImpl,
[src]
Loading content...T: Machine<P>,
P: MachineImpl,