brane_exe::spec

Trait CustomLocalState

Source
pub trait CustomLocalState:
    'static
    + Send
    + Sync
    + Clone {
    // Required method
    fn new(global: &Arc<RwLock<impl CustomGlobalState>>) -> Self;
}
Expand description

Defines whatever is needed for the custom local part of a RunState.

Required Methods§

Source

fn new(global: &Arc<RwLock<impl CustomGlobalState>>) -> Self

Constructs a new CustomLocalState from the given global state.

§Arguments
  • global: The global state to create this state from.
§Returns

A new instance of Self.

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.

Implementations on Foreign Types§

Source§

impl CustomLocalState for ()

Source§

fn new(_global: &Arc<RwLock<impl CustomGlobalState>>) -> Self

Implementors§