[−][src]Struct imxrt1062_fcb_gen::LookupTable
The lookup table, part of the general FCB memory region.
LookupTable
is a fixed-sized byte array. We provide convenience
methods for inserting u32
s into the table. Just as with slices,
insertion of larger-sized types will panic if the computed offset
is out of range.
use imxrt1062_fcb_gen::LookupTable; let mut lookup_table = LookupTable::new(); lookup_table.insert_u32(0, 0xDEADBEEF); assert_eq!(lookup_table[3], 0xDE);
Methods
impl LookupTable
[src]
pub fn new() -> Self
[src]
Create a new lookup table. All memory is set to zero.
pub fn insert_u32(&mut self, u32_index: usize, value: u32)
[src]
Treat the underlying memory as a u32
slice, and insert
value
at the u32_index
.
The value will be serialized as a little-endian value.
Panic
Panics if the computed index is out of range.
Trait Implementations
impl AsMut<[u8]> for LookupTable
[src]
impl AsRef<[u8]> for LookupTable
[src]
impl Default for LookupTable
[src]
fn default() -> LookupTable
[src]
impl Deref for LookupTable
[src]
impl DerefMut for LookupTable
[src]
Auto Trait Implementations
impl RefUnwindSafe for LookupTable
impl Send for LookupTable
impl Sync for LookupTable
impl Unpin for LookupTable
impl UnwindSafe for LookupTable
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,