Struct oasis_core_runtime::consensus::state::roothash::ImmutableState
source · pub struct ImmutableState<'a, T: ImmutableMKVS> { /* private fields */ }
Expand description
Consensus roothash state wrapper.
Implementations§
source§impl<'a, T: ImmutableMKVS> ImmutableState<'a, T>
impl<'a, T: ImmutableMKVS> ImmutableState<'a, T>
sourcepub fn new(mkvs: &'a T) -> ImmutableState<'a, T>
pub fn new(mkvs: &'a T) -> ImmutableState<'a, T>
Constructs a new ImmutableMKVS.
source§impl<'a, T: ImmutableMKVS> ImmutableState<'a, T>
impl<'a, T: ImmutableMKVS> ImmutableState<'a, T>
sourcepub fn state_root(&self, id: Namespace) -> Result<Hash, Error>
pub fn state_root(&self, id: Namespace) -> Result<Hash, Error>
Returns the state root for a specific runtime.
sourcepub fn last_round_results(&self, id: Namespace) -> Result<RoundResults, Error>
pub fn last_round_results(&self, id: Namespace) -> Result<RoundResults, Error>
Returns the last round results for a specific runtime.
pub fn round_roots( &self, id: Namespace, round: u64, ) -> Result<Option<RoundRoots>, StateError>
pub fn past_round_roots( &self, id: Namespace, ) -> Result<BTreeMap<u64, RoundRoots>, StateError>
Auto Trait Implementations§
impl<'a, T> Freeze for ImmutableState<'a, T>
impl<'a, T> RefUnwindSafe for ImmutableState<'a, T>where
T: RefUnwindSafe,
impl<'a, T> Send for ImmutableState<'a, T>where
T: Sync,
impl<'a, T> Sync for ImmutableState<'a, T>where
T: Sync,
impl<'a, T> Unpin for ImmutableState<'a, T>
impl<'a, T> UnwindSafe for ImmutableState<'a, T>where
T: RefUnwindSafe,
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more