pub trait CoreExt: Clone + Debug {
type Reg: Register;
type Config: Default;
// Required methods
fn with(config: Self::Config) -> Self;
fn get(&self, reg: Self::Reg) -> Option<<Self::Reg as Register>::Value>;
fn clr(&mut self, reg: Self::Reg);
fn put(
&mut self,
reg: Self::Reg,
val: Option<<Self::Reg as Register>::Value>,
);
fn reset(&mut self);
// Provided method
fn set(&mut self, reg: Self::Reg, val: <Self::Reg as Register>::Value) { ... }
}
Expand description
Extension to the AluVM core provided by an ISA.
Required Associated Types§
Required Methods§
Sourcefn with(config: Self::Config) -> Self
fn with(config: Self::Config) -> Self
Constructs the core extensions to be added to AluVM core.
Sourcefn get(&self, reg: Self::Reg) -> Option<<Self::Reg as Register>::Value>
fn get(&self, reg: Self::Reg) -> Option<<Self::Reg as Register>::Value>
Read the value of a register.
Provided Methods§
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.