[][src]Struct vtable::VOffset

#[repr(C)]pub struct VOffset<Base, T: ?Sized + VTableMeta, PinFlag = NotPinned> { /* fields omitted */ }

Represents an offset to a field of type matching the vtable, within the Base container structure.

Implementations

impl<Base, T: ?Sized + VTableMeta, Flag> VOffset<Base, T, Flag>[src]

pub fn apply<'a>(self, x: &'a Base) -> VRef<'a, T>[src]

pub fn apply_mut<'a>(self, x: &'a mut Base) -> VRefMut<'a, T>[src]

pub fn new<X: HasStaticVTable<T>>(o: FieldOffset<Base, X, Flag>) -> Self[src]

pub unsafe fn from_raw(vtable: &'static T::VTable, offset: usize) -> Self[src]

Create a new VOffset from raw data

Safety: there must be a field that matches the vtable at offset T in base.

impl<Base, T: ?Sized + VTableMeta> VOffset<Base, T, AllowPin>[src]

pub fn apply_pin<'a>(self, x: Pin<&'a Base>) -> Pin<VRef<'a, T>>[src]

Trait Implementations

impl<Base, T: ?Sized + VTableMeta, Flag> Clone for VOffset<Base, T, Flag>[src]

impl<Base, T: ?Sized + VTableMeta, Flag> Copy for VOffset<Base, T, Flag>[src]

impl<Base, T: ?Sized + VTableMeta, PinFlag> Debug for VOffset<Base, T, PinFlag>[src]

Auto Trait Implementations

impl<Base, T: ?Sized, PinFlag> RefUnwindSafe for VOffset<Base, T, PinFlag> where
    PinFlag: RefUnwindSafe,
    <T as VTableMeta>::VTable: RefUnwindSafe

impl<Base, T: ?Sized, PinFlag> Send for VOffset<Base, T, PinFlag> where
    PinFlag: Send,
    <T as VTableMeta>::VTable: Sync

impl<Base, T: ?Sized, PinFlag> Sync for VOffset<Base, T, PinFlag> where
    PinFlag: Sync,
    <T as VTableMeta>::VTable: Sync

impl<Base, T: ?Sized, PinFlag> Unpin for VOffset<Base, T, PinFlag> where
    PinFlag: Unpin

impl<Base, T: ?Sized, PinFlag> UnwindSafe for VOffset<Base, T, PinFlag> where
    PinFlag: UnwindSafe,
    <T as VTableMeta>::VTable: RefUnwindSafe

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, 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.