Trait evegfx::memory::region::MemoryRegion[][src]

pub trait MemoryRegion: Sized + Debug + Copy {
    type Model: Model;

    const BASE_ADDR: u32;
    const LENGTH: u32;
    const DEBUG_NAME: &'static str;
    fn ptr(raw: u32) -> Ptr<Self> { ... }
fn contains_addr(raw: u32) -> bool { ... } }

A trait implemented by all memory regions that Ptr instances can refer to.

It doesn't make sense to implement this trait outside of the evegfx crate. It is implemented by EVE-model-specific APIs elsewhere in this crate. Within the context of a particular model none of the available memory regions may overlap.

Memory regions exist only at compile time, as a facility to have the Rust type system help ensure valid use of pointers. At runtime we deal only in absolute addresses represented as u32.

Associated Types

Loading content...

Associated Constants

const BASE_ADDR: u32[src]

const LENGTH: u32[src]

const DEBUG_NAME: &'static str[src]

Loading content...

Provided methods

fn ptr(raw: u32) -> Ptr<Self>[src]

Creates a pointer in the selected memory region.

The given value is interpreted as an offset into the memory region, modulo the size of the region.

fn contains_addr(raw: u32) -> bool[src]

Loading content...

Implementors

impl MemoryRegion for evegfx::models::bt815::CommandErrMem[src]

type Model = BT815

impl MemoryRegion for evegfx::models::bt815::CommandMem[src]

type Model = BT815

impl MemoryRegion for evegfx::models::bt815::DisplayListMem[src]

type Model = BT815

impl MemoryRegion for evegfx::models::bt815::ExtFlashMem[src]

type Model = BT815

impl MemoryRegion for evegfx::models::bt815::MainMem[src]

type Model = BT815

impl MemoryRegion for evegfx::models::bt815::RegisterMem[src]

type Model = BT815

impl MemoryRegion for evegfx::models::fake::CommandErrMem[src]

type Model = Model

impl MemoryRegion for evegfx::models::fake::CommandMem[src]

type Model = Model

impl MemoryRegion for evegfx::models::fake::DisplayListMem[src]

type Model = Model

impl MemoryRegion for evegfx::models::fake::ExtFlashMem[src]

type Model = Model

impl MemoryRegion for evegfx::models::fake::MainMem[src]

type Model = Model

impl MemoryRegion for evegfx::models::fake::RegisterMem[src]

type Model = Model

Loading content...