pub trait State: Sized + Clone {
    type Error: Error;
    type Header: Header;
    type Content: Fragment;

    fn apply_block<'a, I>(
        &self,
        header: &Self::Header,
        contents: I
    ) -> Result<Self, Self::Error>
    where
        I: IntoIterator<Item = &'a Self::Content>,
        Self::Content: 'a
; fn apply_contents<'a, I>(&self, contents: I) -> Result<Self, Self::Error>
    where
        I: IntoIterator<Item = &'a Self::Content>,
        Self::Content: 'a
; }

Required Associated Types

Required Methods

yield a new block in the state

This will change the state in the sense that it acknowledge the creation of a new block in its internal state.

apply new block contents. This modify the state in small steps however it does not acknowledge the creation of a new block

Implementors