[][src]Struct imxrt1062_fcb_gen::LookupTable

pub struct LookupTable(_);

The lookup table, part of the general FCB memory region.

LookupTable is a fixed-sized byte array. We provide convenience methods for inserting u32s 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]

impl Deref for LookupTable[src]

type Target = [u8]

The resulting type after dereferencing.

impl DerefMut for LookupTable[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.