Trait rune::runtime::unit::UnitStorage
source · pub trait UnitStorage: Sealed + Debug + Default {
type Iter<'this>: Iterator<Item = (usize, Inst)>
where Self: 'this;
// Required methods
fn end(&self) -> usize;
fn bytes(&self) -> usize;
fn iter(&self) -> Self::Iter<'_>;
fn get(&self, ip: usize) -> Result<Option<(Inst, usize)>, BadInstruction>;
fn translate(&self, jump: usize) -> Result<usize, BadJump>;
}
Expand description
Instruction storage used by a Unit
.
Required Associated Types§
Required Methods§
sourcefn end(&self) -> usize
fn end(&self) -> usize
Size of unit storage. This can be seen as the instruction pointer which is just beyond the last instruction.
Object Safety§
This trait is not object safe.