Struct vtable::VOffset[][src]

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

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

Implementations

Apply this offset to a reference to the base to obtain a VRef with the same lifetime as the base lifetime

Apply this offset to a reference to the base to obtain a VRefMut with the same lifetime as the base lifetime

Create an new VOffset from a [FieldOffset] where the target type implement the HasStaticVTable trait.

Create a new VOffset from raw data

Safety

There must be a field that matches the vtable at offset T in base.

Apply this offset to a reference to the base to obtain a Pin<VRef<'a, T>> with the same lifetime as the base lifetime

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.