Struct embedded_builder::region::Region
[−]
[src]
pub struct Region<T: 'static>(_);
Region type describes a memory region containing an array of objects This can be used to memory map lists of objects, for example, pixels in a framebuffer
Methods
impl<T> Region<T>
[src]
pub fn read_addr(addr: u32) -> T
[src]
Read an object from the provided (absolute) address
pub fn write_addr(addr: u32, v: T)
[src]
Write an object to the provided (absolute) address
pub fn new(addr: usize, len: usize) -> Region<T>
[src]
Create a new indexable memory region of the provided type
pub fn read_index(&self, i: usize) -> &T
[src]
Read an object from the provided index
pub fn write_index(&mut self, i: usize, v: T)
[src]
Write an object to the provided index
Trait Implementations
impl<T: Debug + 'static> Debug for Region<T>
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl<T: PartialEq + 'static> PartialEq for Region<T>
[src]
fn eq(&self, __arg_0: &Region<T>) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Region<T>) -> bool
[src]
This method tests for !=
.
impl<T> From<(usize, usize)> for Region<T>
[src]
From implementation creates regions from tuples of (address: usize, size: usize)