brane_exe::errors

Trait 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§