pub struct RAMLookup<T, ID: LookupTableID> { /* private fields */ }
Expand description
Struct containing a RAMLookup
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