Trait brane_exe::errors::ReturnEdge

source ·
pub trait ReturnEdge {
    type Ret;

    // Required methods
    fn to(self, pc: ProgramCounter) -> Result<Self::Ret, VmError>;
    fn to_instr(
        self,
        pc: ProgramCounter,
        instr: usize,
    ) -> Result<Self::Ret, VmError>;
}
Expand description

Trait that makes printing shit a bit easier.

Required Associated Types§

source

type Ret

The return type

Required Methods§

source

fn to(self, pc: ProgramCounter) -> Result<Self::Ret, VmError>

Maps this result to a VmError that has only an edge.

§Arguments
  • edge: The edge to insert.
source

fn to_instr( self, pc: ProgramCounter, instr: usize, ) -> Result<Self::Ret, VmError>

Maps this result to a VmError that has some instructions.

§Arguments
  • edge: The edge to insert.
  • instr: The instruction to insert.

Implementations on Foreign Types§

source§

impl<T> ReturnEdge for Result<T, StackError>

source§

type Ret = T

The return type

source§

fn to(self, pc: ProgramCounter) -> Result<Self::Ret, VmError>

Maps this result to a VmError that has only an edge.

§Arguments
  • edge: The edge to insert.
source§

fn to_instr( self, pc: ProgramCounter, instr: usize, ) -> Result<Self::Ret, VmError>

Maps this result to a VmError that has some instructions.

§Arguments
  • edge: The edge to insert.
  • instr: The instruction to insert.

Implementors§