PrimitiveSet

Trait PrimitiveSet 

Source
pub trait PrimitiveSet: Sized {
    type Error: Exception;

    // Required method
    fn operate(
        &mut self,
        memory: &mut Memory<'_>,
        primitive: usize,
    ) -> Result<(), Self::Error>;
}
Expand description

A primitive set.

PrimitiveSets provide primitive functionalities, such as arithmetic and I/O, to Vms. Each primitive has its own identifier.

Required Associated Types§

Source

type Error: Exception

An error.

Required Methods§

Source

fn operate( &mut self, memory: &mut Memory<'_>, primitive: usize, ) -> Result<(), Self::Error>

Runs a primitive on a virtual machine.

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.

Implementors§