Skip to main content

Context

Trait Context 

Source
pub trait Context {
    // Required methods
    fn storage(&self) -> &CoreBlockStorage;
    fn payload(&self) -> Vec<u8> ;
    fn event(&self) -> Cid;
    fn state(&self) -> Option<Cid>;
    fn set_state(&mut self, cid: Cid);
    fn write_diagnostic(&mut self, cid: Cid);
}
Expand description

COre execution context.

Required Methods§

Source

fn storage(&self) -> &CoreBlockStorage

Storage instance.

Source

fn payload(&self) -> Vec<u8>

Get runtime payload.

Source

fn event(&self) -> Cid

Get action to apply to the state.

Source

fn state(&self) -> Option<Cid>

Get current COre state. Returns None if no prior state.

Source

fn set_state(&mut self, cid: Cid)

Set next COre state.

Source

fn write_diagnostic(&mut self, cid: Cid)

Write diagnostic block.

Implementors§