pub struct RAMLookup<T, ID: LookupTableID> {
pub(crate) table_id: ID,
pub(crate) mode: LookupMode,
pub(crate) magnitude: T,
pub(crate) value: Vec<T>,
}Expand description
Struct containing a RAMLookup
Fields§
§table_id: IDThe table ID corresponding to this lookup
mode: LookupModeWhether it is a read or write lookup
magnitude: TThe number of times that this lookup value should be added to / subtracted from the lookup accumulator.
value: Vec<T>The columns containing the content of this lookup
Implementations§
Source§impl<T, ID> RAMLookup<T, ID>
impl<T, ID> RAMLookup<T, ID>
Sourcepub fn new(mode: LookupMode, table_id: ID, magnitude: T, value: &[T]) -> Self
pub fn new(mode: LookupMode, table_id: ID, magnitude: T, value: &[T]) -> Self
Creates a new RAMLookup from a mode, a table ID, a magnitude, and a value
Sourcepub fn numerator(&self) -> T
pub fn numerator(&self) -> T
Returns the numerator corresponding to this lookup in the Logup argument
Sourcepub fn into_logup(self) -> Logup<T, ID>
pub fn into_logup(self) -> Logup<T, ID>
Transforms the current RAMLookup into an equivalent Logup
Sourcepub fn read_if(if_is_true: T, table_id: ID, value: Vec<T>) -> Self
pub fn read_if(if_is_true: T, table_id: ID, value: Vec<T>) -> Self
Reads one value when if_is_true is 1.
Trait Implementations§
Auto Trait Implementations§
impl<T, ID> Freeze for RAMLookup<T, ID>
impl<T, ID> RefUnwindSafe for RAMLookup<T, ID>where
ID: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, ID> Send for RAMLookup<T, ID>where
T: Send,
impl<T, ID> Sync for RAMLookup<T, ID>where
T: Sync,
impl<T, ID> Unpin for RAMLookup<T, ID>
impl<T, ID> UnwindSafe for RAMLookup<T, ID>where
ID: UnwindSafe,
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more