[][src]Struct vptr::VPtr

pub struct VPtr<T, Trait: ?Sized> where
    T: HasVPtr<Trait>, 
{ /* fields omitted */ }

Represent a pointer to a virtual table to the trait Trait that is to be embedded in a structure T

One should not need to use this structure directly, it is going to be created by the vptr procedural macro.

Methods

impl<T, Trait: ?Sized> VPtr<T, Trait> where
    T: HasVPtr<Trait>, 
[src]

pub fn new() -> Self[src]

Creates a new VPtr initialized to a pointer of the vtable of the Trait for the type T. Same as VPtr::default()

Trait Implementations

impl<T: Eq, Trait: Eq + ?Sized> Eq for VPtr<T, Trait> where
    T: HasVPtr<Trait>, 
[src]

impl<T, Trait: ?Sized> Default for VPtr<T, Trait> where
    T: HasVPtr<Trait>, 
[src]

impl<T: Clone, Trait: Clone + ?Sized> Clone for VPtr<T, Trait> where
    T: HasVPtr<Trait>, 
[src]

impl<T: PartialOrd, Trait: PartialOrd + ?Sized> PartialOrd<VPtr<T, Trait>> for VPtr<T, Trait> where
    T: HasVPtr<Trait>, 
[src]

impl<T: PartialEq, Trait: PartialEq + ?Sized> PartialEq<VPtr<T, Trait>> for VPtr<T, Trait> where
    T: HasVPtr<Trait>, 
[src]

impl<T: Copy, Trait: Copy + ?Sized> Copy for VPtr<T, Trait> where
    T: HasVPtr<Trait>, 
[src]

impl<T: Hash, Trait: Hash + ?Sized> Hash for VPtr<T, Trait> where
    T: HasVPtr<Trait>, 
[src]

impl<T, Trait: ?Sized> Debug for VPtr<T, Trait> where
    T: HasVPtr<Trait>, 
[src]

Auto Trait Implementations

impl<T, Trait> !Send for VPtr<T, Trait>

impl<T, Trait: ?Sized> Unpin for VPtr<T, Trait>

impl<T, Trait> !Sync for VPtr<T, Trait>

impl<T, Trait: ?Sized> UnwindSafe for VPtr<T, Trait> where
    T: RefUnwindSafe,
    Trait: RefUnwindSafe

impl<T, Trait: ?Sized> RefUnwindSafe for VPtr<T, Trait> where
    T: RefUnwindSafe,
    Trait: RefUnwindSafe

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for 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.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]