Trait cardano_multiplatform_lib::chain_core::property::State
source · [−]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
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_block<'a, I>(
&self,
header: &Self::Header,
contents: I
) -> Result<Self, Self::Error> where
I: IntoIterator<Item = &'a Self::Content>,
Self::Content: 'a,
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.
fn apply_contents<'a, I>(&self, 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,
apply new block contents. This modify the state in small steps however it does not acknowledge the creation of a new block