pub trait PrimitiveAddress: Copy + Eq + PartialEq + Ord + PartialOrd + Hash + LowerHex + UpperHex + ByteSwap + Add<Output = Self> + Sub<Output = Self> {
Show 13 methods // Required methods fn null() -> Self; fn invalid() -> Self; fn min() -> Self; fn max() -> Self; fn from_umem(frm: umem) -> Self; fn from_imem(frm: imem) -> Self; fn wrapping_add(self, rhs: Self) -> Self; fn wrapping_sub(self, rhs: Self) -> Self; fn saturating_sub(self, rhs: Self) -> Self; fn overflowing_shr(self, rhs: u32) -> (Self, bool); fn to_umem(self) -> umem; fn to_imem(self) -> imem; // Provided method fn is_null(self) -> bool { ... }
}
Expand description

PrimitiveAddress describes the address of a target system. The current implementations include u32, u64 and later eventually u128. This trait can be used to abstract objects over the target pointer width.

Required Methods§

source

fn null() -> Self

source

fn invalid() -> Self

source

fn min() -> Self

source

fn max() -> Self

source

fn from_umem(frm: umem) -> Self

source

fn from_imem(frm: imem) -> Self

source

fn wrapping_add(self, rhs: Self) -> Self

source

fn wrapping_sub(self, rhs: Self) -> Self

source

fn saturating_sub(self, rhs: Self) -> Self

source

fn overflowing_shr(self, rhs: u32) -> (Self, bool)

source

fn to_umem(self) -> umem

source

fn to_imem(self) -> imem

Provided Methods§

source

fn is_null(self) -> bool

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl PrimitiveAddress for u16

source§

fn null() -> Self

source§

fn invalid() -> Self

source§

fn min() -> Self

source§

fn max() -> Self

source§

fn from_umem(frm: umem) -> Self

source§

fn from_imem(frm: imem) -> Self

source§

fn wrapping_add(self, rhs: Self) -> Self

source§

fn wrapping_sub(self, rhs: Self) -> Self

source§

fn saturating_sub(self, rhs: Self) -> Self

source§

fn overflowing_shr(self, rhs: u32) -> (Self, bool)

source§

fn to_umem(self) -> umem

source§

fn to_imem(self) -> imem

source§

impl PrimitiveAddress for u32

source§

fn null() -> Self

source§

fn invalid() -> Self

source§

fn min() -> Self

source§

fn max() -> Self

source§

fn from_umem(frm: umem) -> Self

source§

fn from_imem(frm: imem) -> Self

source§

fn wrapping_add(self, rhs: Self) -> Self

source§

fn wrapping_sub(self, rhs: Self) -> Self

source§

fn saturating_sub(self, rhs: Self) -> Self

source§

fn overflowing_shr(self, rhs: u32) -> (Self, bool)

source§

fn to_umem(self) -> umem

source§

fn to_imem(self) -> imem

source§

impl PrimitiveAddress for u64

source§

fn null() -> Self

source§

fn invalid() -> Self

source§

fn min() -> Self

source§

fn max() -> Self

source§

fn from_umem(frm: umem) -> Self

source§

fn from_imem(frm: imem) -> Self

source§

fn wrapping_add(self, rhs: Self) -> Self

source§

fn wrapping_sub(self, rhs: Self) -> Self

source§

fn saturating_sub(self, rhs: Self) -> Self

source§

fn overflowing_shr(self, rhs: u32) -> (Self, bool)

source§

fn to_umem(self) -> umem

source§

fn to_imem(self) -> imem

Implementors§