referrerpolicy=no-referrer-when-downgrade
sp_state_machine

Trait InspectState

Source
pub trait InspectState<H: Hasher, B: Backend<H>> {
    // Required method
    fn inspect_state<F: FnOnce() -> R, R>(&self, f: F) -> R;
}
Expand description

Trait for inspecting state in any backend.

Implemented for any backend.

Required Methods§

Source

fn inspect_state<F: FnOnce() -> R, R>(&self, f: F) -> R

Inspect state with a closure.

Self will be set as read-only externalities and inspection closure will be run against it.

Returns the result of the closure.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<H: Hasher, B: Backend<H>> InspectState<H, B> for B
where H::Out: Encode,