ConstVTableOf

Trait ConstVTableOf 

Source
pub unsafe trait ConstVTableOf<T: Dynamic<Self::Bounds>>: VTableOf<T> {
    const INSTANCE: Self;
}
Expand description

Generate VTable instance for type in const context.

The type T must satisfy the dynamic trait bounds given by Self::Bounds.

This is the const form of VTableOf. Because traits can’t have const methods the instance is an associated constant.

§Safety

Required Associated Constants§

Source

const INSTANCE: Self

Instance of the vtable for the type T.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<'a, 'b, T, B: IsBound> ConstVTableOf<T> for &'b LifetimeVTable<'a, B>
where T: Dynamic<B> + StaticForm<'a>,

Source§

const INSTANCE: Self

Source§

impl<'a, T, B: IsBound> ConstVTableOf<T> for &'a StaticVTable<B>
where T: Dynamic<B> + 'static,

Source§

const INSTANCE: Self

Source§

impl<'a, T, B: IsBound> ConstVTableOf<T> for LifetimeVTable<'a, B>
where T: Dynamic<B> + StaticForm<'a>,

Source§

const INSTANCE: Self

Source§

impl<'a, T: VTable, U: Dynamic<T::Bounds>> ConstVTableOf<U> for Unaligned<&'a T>
where &'a T: ConstVTableOf<U, Bounds = T::Bounds>,

Source§

const INSTANCE: Self

Source§

impl<T, B: IsBound> ConstVTableOf<T> for StaticVTable<B>
where T: Dynamic<B> + 'static,

Source§

const INSTANCE: Self