[][src]Struct rkyv_dyn::ArchivedDyn

pub struct ArchivedDyn<T: ?Sized> { /* fields omitted */ }

A reference to an archived trait object.

This is essentially a pair of a data pointer and a vtable id. The vtable_cache feature is recommended if your situation allows for it. With vtable_cache, the vtable will only be looked up once and then stored locally for subsequent lookups when the reference is dereferenced.

ArchivedDyn is the trait object extension of RelPtr.

Implementations

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

pub fn new(from: usize, resolver: DynResolver, id: &ImplId) -> ArchivedDyn<T>[src]

Creates a new ArchivedDyn from a data position, DynResolver, and an implementation id.

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

Gets the data pointer of the trait object.

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

Gets the vtable pointer for this trait object. With the vtable_cache feature, this will store the vtable locally on the first lookup.

Trait Implementations

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

impl<T: ?Sized> Deref for ArchivedDyn<T> where
    &'a T: From<TraitObject>, 
[src]

type Target = T

The resulting type after dereferencing.

Auto Trait Implementations

impl<T: ?Sized> RefUnwindSafe for ArchivedDyn<T> where
    T: RefUnwindSafe

impl<T: ?Sized> Send for ArchivedDyn<T> where
    T: Send

impl<T: ?Sized> Sync for ArchivedDyn<T> where
    T: Sync

impl<T: ?Sized> Unpin for ArchivedDyn<T> where
    T: Unpin

impl<T: ?Sized> UnwindSafe for ArchivedDyn<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> 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.