// Copyright 2021 Vladislav Melnik
// SPDX-License-Identifier: MIT
usesuper::{proposal::{Proposal, ReadOnce, WriteOnce},request::Request,};/// The deterministic state machine.
/// It accepts proposals from network and issues requests.
/// All business logic should be implemented inside.
pubtraitState<R, W>
where
R: ReadOnce,
W: WriteOnce,
{/// Some user defined inputs to the state machine
typeExt;/// Randomness needed by the state machine
typeRng;/// In order to preserve determinism, it should be the only input to the state machine.
fnaccept(&mutself, proposal:Proposal<R, W, Self::Ext, Self::Rng>)-> Request;}