[][src]Struct pelite::Pir

#[repr(transparent)]pub struct Pir<T: ?Sized = ()> { /* fields omitted */ }

Typed relative virtual address.

Implementations

impl<T: ?Sized> Pir<T>[src]

pub const NULL: Pir<T>[src]

Null pointer constant.

pub fn null() -> Pir<T>[src]

Creates a null pointer.

pub fn is_null(self) -> bool[src]

Returns true if the pointer is null.

pub fn cast<U: ?Sized>(self) -> Pir<U>[src]

Casts the pointer to a different type keeping the pointer address fixed.

pub fn offset<U: ?Sized>(self, offset: i32) -> Pir<U>[src]

Offsets and casts the pointer to a differen type.

Because the type of the current and the target may be unrelated, this is a byte offset.

pub fn into_raw(self) -> u32[src]

Returns the raw integer, type ascription helper.

impl<T> Pir<[T]>[src]

pub fn decay(self) -> Pir<T>[src]

Decays the pointer from [T] to T.

pub fn at(self, i: usize) -> Pir<T>[src]

Pointer arithmetic, gets the pointer of an element at the specified index.

Trait Implementations

impl<T: ?Sized> AsMut<u32> for Pir<T>[src]

impl<T: ?Sized> AsRef<u32> for Pir<T>[src]

impl<T: ?Sized> Clone for Pir<T>[src]

impl<T: ?Sized> Copy for Pir<T>[src]

impl<T: ?Sized> Debug for Pir<T>[src]

impl<T: ?Sized> Default for Pir<T>[src]

impl<T: ?Sized> Display for Pir<T>[src]

impl<T: ?Sized> Eq for Pir<T>[src]

impl<T: ?Sized> From<Pir<T>> for u32[src]

impl<T: ?Sized> From<u32> for Pir<T>[src]

impl<T: ?Sized> Hash for Pir<T>[src]

impl<T: ?Sized> LowerHex for Pir<T>[src]

impl<T: ?Sized> Ord for Pir<T>[src]

impl<T: ?Sized> PartialEq<Pir<T>> for Pir<T>[src]

impl<T: ?Sized> PartialOrd<Pir<T>> for Pir<T>[src]

impl<T: ?Sized> Pod for Pir<T> where
    Pir<T>: 'static, 
[src]

impl<T: ?Sized> Serialize for Pir<T>[src]

impl<T: ?Sized> UpperHex for Pir<T>[src]

Auto Trait Implementations

impl<T: ?Sized> RefUnwindSafe for Pir<T>

impl<T: ?Sized> Send for Pir<T>

impl<T: ?Sized> Sync for Pir<T>

impl<T: ?Sized> Unpin for Pir<T>

impl<T: ?Sized> UnwindSafe for Pir<T>

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.