[][src]Struct rkyv::RelPtr

#[repr(transparent)]pub struct RelPtr<T> { /* fields omitted */ }

A strongly typed pointer which resolves to relative to its position in memory.

See Archive for an example of creating one.

Implementations

impl<T> RelPtr<T>[src]

pub fn new(from: usize, to: usize) -> Self[src]

Creates a relative pointer from one position to another. from must be the location where the relative pointer is written.

pub fn as_ptr(&self) -> *const T[src]

Calculates the memory address being pointed to by this relative pointer.

Trait Implementations

impl<T: Debug> Debug for RelPtr<T>[src]

impl<T> Deref for RelPtr<T>[src]

type Target = T

The resulting type after dereferencing.

impl<T: Eq> Eq for RelPtr<T>[src]

impl<T: Hash> Hash for RelPtr<T>[src]

impl<T: PartialEq> PartialEq<RelPtr<T>> for RelPtr<T>[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for RelPtr<T> where
    T: RefUnwindSafe

impl<T> Send for RelPtr<T> where
    T: Send

impl<T> Sync for RelPtr<T> where
    T: Sync

impl<T> Unpin for RelPtr<T> where
    T: Unpin

impl<T> UnwindSafe for RelPtr<T> where
    T: UnwindSafe

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> CallHasher for T where
    T: Hash
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[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.