[][src]Struct flp_framework::address::Word

#[repr(C)]
pub struct Word(_);

A Word is a value representing data, useful for its ability to be addressed and subsequently accessed by a WordAddr. Suppose you have some word address in wa and you want to ensure that the lowest bit of that word is set:

let w : Word = wa.load();
assert!(w.is_aligned_to(2) == false);

Trait Implementations

impl Address for Word[src]

fn from_usize(val: usize) -> Word[src]

Constructor for a word value from a raw usize.

let w = Word::from_usize(0xff);

fn as_usize(&self) -> usize[src]

Deconstructor for a word value into a raw usize value.

let w = Word::from_usize(0xff);
assert!(w.as_usize() == 255);

fn verify(self) -> bool[src]

All possible word values are valid:

let w = Word::from_usize(0xff);
assert!(w.verify());

fn load<T: Copy>(&self) -> T[src]

A word cannot be accessed.

fn store<T>(&self, _value: T)[src]

A word cannot be accessed.

fn memset(&self, _char: u8, _length: usize)[src]

Raw word values are not writeable.

impl Clone for Word[src]

impl Copy for Word[src]

impl Debug for Word[src]

fn fmt(&self, f: &mut Formatter) -> Result[src]

Display this address as a prettified alphanumeric hex string for debugging.

impl Display for Word[src]

fn fmt(&self, f: &mut Formatter) -> Result[src]

Display this address as a prettified alphanumeric hex string.

impl Eq for Word[src]

impl Hash for Word[src]

impl Ord for Word[src]

fn cmp(&self, other: &Word) -> Ordering[src]

Address ordinality delegates to usize ordinality.

impl PartialEq<Word> for Word[src]

fn eq(&self, other: &Word) -> bool[src]

Address equality delegates to usize equality

fn ne(&self, other: &Word) -> bool[src]

Address inequality delegates to usize equality

impl PartialOrd<Word> for Word[src]

fn partial_cmp(&self, other: &Word) -> Option<Ordering>[src]

Address ordinality delegates to usize ordinality.

impl Pointer for Word[src]

fn fmt(&self, f: &mut Formatter) -> Result[src]

Display this address as a prettified alphanumeric hex string.

impl StructuralEq for Word[src]

impl UpperHex for Word[src]

fn fmt(&self, f: &mut Formatter) -> Result[src]

Format this address as an alphanumeric hex string.

Auto Trait Implementations

impl RefUnwindSafe for Word

impl Send for Word

impl Sync for Word

impl Unpin for Word

impl UnwindSafe for Word

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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[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.