#[repr(C)]pub struct VTable<Head, Tail = VtDrop> {
pub tail: Tail,
pub head: Head,
}Expand description
A recursive type to define sets of v-tables.
You should always use stabby::vtable!(Trait1 + Trait2 + ...) to generate this type,
as this macro will ensure that traits are ordered consistently in the vtable.
Fields§
§tail: TailThe rest of the vtable.
It comes first to allow upcasting vtables.
head: HeadThe head of the vtable (the last trait listed in the macros)
Implementations§
Trait Implementations§
Source§impl<'a, T, Head, Tail> IConstConstructor<'a, T> for VTable<Head, Tail>
impl<'a, T, Head, Tail> IConstConstructor<'a, T> for VTable<Head, Tail>
Source§impl<Head, Tail> IStable for VTable<Head, Tail>
impl<Head, Tail> IStable for VTable<Head, Tail>
Source§const REPORT: &'static TypeReport
const REPORT: &'static TypeReport
A compile-time generated report of the fields of the type, allowing for compatibility inspection.
Source§const ID: u64
const ID: u64
A stable (and ideally unique) identifier for the type. Often generated using
crate::report::gen_id, but can be manually set.Source§type ForbiddenValues = <Struct<FieldPair<Tail, Head>> as IStable>::ForbiddenValues
type ForbiddenValues = <Struct<FieldPair<Tail, Head>> as IStable>::ForbiddenValues
The values that the annotated type cannot occupy.
Source§type UnusedBits = <Struct<FieldPair<Tail, Head>> as IStable>::UnusedBits
type UnusedBits = <Struct<FieldPair<Tail, Head>> as IStable>::UnusedBits
The padding bits in the annotated types
Source§type Size = <Struct<FieldPair<Tail, Head>> as IStable>::Size
type Size = <Struct<FieldPair<Tail, Head>> as IStable>::Size
The size of the annotated type in bytes.
Source§type Align = <Struct<FieldPair<Tail, Head>> as IStable>::Align
type Align = <Struct<FieldPair<Tail, Head>> as IStable>::Align
The alignment of the annotated type in bytes.
Source§type HasExactlyOneNiche = <Struct<FieldPair<Tail, Head>> as IStable>::HasExactlyOneNiche
type HasExactlyOneNiche = <Struct<FieldPair<Tail, Head>> as IStable>::HasExactlyOneNiche
Allows the detection of whether or not
core::option::Options are stable: Read moreSource§type ContainsIndirections = <Struct<FieldPair<Tail, Head>> as IStable>::ContainsIndirections
type ContainsIndirections = <Struct<FieldPair<Tail, Head>> as IStable>::ContainsIndirections
Whether or not the type contains indirections (pointers, indices in independent data-structures…)
Source§impl<Head, Tail> TransitiveDeref<Head, H> for VTable<Head, Tail>
impl<Head, Tail> TransitiveDeref<Head, H> for VTable<Head, Tail>
Source§impl<Head, Tail: TransitiveDeref<Vt, N>, Vt, N> TransitiveDeref<Vt, T<N>> for VTable<Head, Tail>
impl<Head, Tail: TransitiveDeref<Vt, N>, Vt, N> TransitiveDeref<Vt, T<N>> for VTable<Head, Tail>
impl<Head: Copy, Tail: Copy> Copy for VTable<Head, Tail>
impl<Head: Eq, Tail: Eq> Eq for VTable<Head, Tail>
impl<Head, Tail: HasSyncVt> HasSendVt for VTable<Head, Tail>
impl<Head, Tail: HasSyncVt> HasSyncVt for VTable<Head, Tail>
impl<Head, Tail> StructuralPartialEq for VTable<Head, Tail>
Auto Trait Implementations§
impl<Head, Tail> Freeze for VTable<Head, Tail>
impl<Head, Tail> RefUnwindSafe for VTable<Head, Tail>where
Tail: RefUnwindSafe,
Head: RefUnwindSafe,
impl<Head, Tail> Send for VTable<Head, Tail>
impl<Head, Tail> Sync for VTable<Head, Tail>
impl<Head, Tail> Unpin for VTable<Head, Tail>
impl<Head, Tail> UnwindSafe for VTable<Head, Tail>where
Tail: UnwindSafe,
Head: UnwindSafe,
Blanket Implementations§
Source§impl<Source> AccessAs for Source
impl<Source> AccessAs for Source
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IPod for T
impl<T> IPod for T
Source§fn identifier() -> u64
fn identifier() -> u64
Produces an identifier for the type, allowing to check type at runtime (barring collisions).