Trait osiris_process::register::RegisterBank
source · pub trait RegisterBank<T, A>where
Self: Sized,{
// Required methods
fn new() -> Self;
fn set(&mut self, register: RegisterId, raw: T);
fn get(&self, register: RegisterId) -> T;
fn apply(&self, range: RegisterRange, function: RangeApplication<T>) -> T;
fn slice(&self, range: RegisterRange) -> &[T];
fn copy(&mut self, to: RegisterId, slice: &[T]);
}Required Methods§
sourcefn set(&mut self, register: RegisterId, raw: T)
fn set(&mut self, register: RegisterId, raw: T)
Sets a specific register in the bank.
sourcefn get(&self, register: RegisterId) -> T
fn get(&self, register: RegisterId) -> T
Gets a specific register from the bank.
sourcefn apply(&self, range: RegisterRange, function: RangeApplication<T>) -> T
fn apply(&self, range: RegisterRange, function: RangeApplication<T>) -> T
Apply the specified RangeApplication in the bank on the specified RegisterRange.
sourcefn slice(&self, range: RegisterRange) -> &[T]
fn slice(&self, range: RegisterRange) -> &[T]
Return a slice from the specified range in the bank.
sourcefn copy(&mut self, to: RegisterId, slice: &[T])
fn copy(&mut self, to: RegisterId, slice: &[T])
Copy the specified slice into the bank to the specified RegisterId and nexts.
Do not overflow. Only the fitting elements are copied.
Object Safety§
This trait is not object safe.