[][src]Struct flp_framework::address::Byte

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

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

let b : Byte = ba.load();
assert!(b.is_aligned_to(2) == true);

Trait Implementations

impl Address for Byte[src]

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

Constructor for a byte value from a raw usize.

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

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

Deconstructor for a byte value into a raw usize value.

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

fn verify(self) -> bool[src]

All possible byte values are valid:

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

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

A byte cannot be accessed.

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

A byte cannot be accessed.

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

Raw byte values are not writeable.

impl Clone for Byte[src]

impl Copy for Byte[src]

impl Debug for Byte[src]

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

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

impl Display for Byte[src]

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

Display this address as a prettified alphanumeric hex string.

impl Eq for Byte[src]

impl Hash for Byte[src]

impl Ord for Byte[src]

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

Address ordinality delegates to usize ordinality.

impl PartialEq<Byte> for Byte[src]

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

Address equality delegates to usize equality

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

Address inequality delegates to usize equality

impl PartialOrd<Byte> for Byte[src]

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

Address ordinality delegates to usize ordinality.

impl Pointer for Byte[src]

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

Display this address as a prettified alphanumeric hex string.

impl StructuralEq for Byte[src]

impl UpperHex for Byte[src]

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

Format this address as an alphanumeric hex string.

Auto Trait Implementations

impl RefUnwindSafe for Byte

impl Send for Byte

impl Sync for Byte

impl Unpin for Byte

impl UnwindSafe for Byte

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.