[−][src]Struct rkyv_dyn::ArchivedDyn
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]
&'a T: From<TraitObject>,
Auto Trait Implementations
impl<T: ?Sized> RefUnwindSafe for ArchivedDyn<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T: ?Sized> Send for ArchivedDyn<T> where
T: Send,
T: Send,
impl<T: ?Sized> Sync for ArchivedDyn<T> where
T: Sync,
T: Sync,
impl<T: ?Sized> Unpin for ArchivedDyn<T> where
T: Unpin,
T: Unpin,
impl<T: ?Sized> UnwindSafe for ArchivedDyn<T> where
T: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,