pub trait State<Cmd> {
type Output;
type Error;
// Required methods
fn process(
&self,
command: &[(Node, Cmd)],
) -> Result<Self::Output, Self::Error>;
fn tick(&self) -> Result<Vec<(Node, Cmd)>, Self::Error>;
}
Required Associated Types§
Required Methods§
Sourcefn process(&self, command: &[(Node, Cmd)]) -> Result<Self::Output, Self::Error>
fn process(&self, command: &[(Node, Cmd)]) -> Result<Self::Output, Self::Error>
Note: This method takes reference, not mutable, to self; this allows for easier composition of state.