Trait cold_io::State[][src]

pub trait State<R, W> where
    R: ReadOnce,
    W: WriteOnce
{ type Ext; type Rng; fn accept(
        &mut self,
        proposal: Proposal<R, W, Self::Ext, Self::Rng>
    ) -> Request; }
Expand description

The deterministic state machine. It accepts proposals from network and issues requests. All business logic should be implemented inside.

Associated Types

Some user defined inputs to the state machine

Randomness needed by the state machine

Required methods

In order to preserve determinism, it should be the only input to the state machine.

Implementors