[][src]Struct flp_framework::address::VoidAddr

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

A VoidAddr, much like a void* in C, is available for those in need of a quick-and-dirty way of representing the value of a pointer without actually being able to read from or write to that pointer.

Methods

impl VoidAddr[src]

pub fn from_addr<A: Address>(ptr: A) -> Self[src]

A void address can be constructed from any other address type.

Trait Implementations

impl Address for VoidAddr[src]

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

Construct a void address:

let va = VoidAddr::from_usize(0xdeadbeef);

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

Deconstruct a void address:

let va = VoidAddr::from_usize(0xdeadbeef);
assert!(va.as_usize() == 3735928559);

fn verify(self) -> bool[src]

Trivially verify that this void address looks valid. All values are valid:

let va = VoidAddr::from_usize(0xdeadbeef);
assert!(va.verify());

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

Void addresses cannot be accessed.

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

Void addresses cannot be accessed.

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

Void addresses cannot be accessed.

impl Clone for VoidAddr[src]

impl Copy for VoidAddr[src]

impl Debug for VoidAddr[src]

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

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

impl Display for VoidAddr[src]

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

Display this address as a prettified alphanumeric hex string.

impl Eq for VoidAddr[src]

impl Hash for VoidAddr[src]

impl Ord for VoidAddr[src]

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

Address ordinality delegates to usize ordinality.

impl PartialEq<VoidAddr> for VoidAddr[src]

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

Address equality delegates to usize equality

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

Address inequality delegates to usize equality

impl PartialOrd<VoidAddr> for VoidAddr[src]

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

Address ordinality delegates to usize ordinality.

impl Pointer for VoidAddr[src]

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

Display this address as a prettified alphanumeric hex string.

impl StructuralEq for VoidAddr[src]

impl UpperHex for VoidAddr[src]

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

Format this address as an alphanumeric hex string.

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> 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.