pub trait RegisterBank<T>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.
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.