VTableSubset

Trait VTableSubset 

Source
pub unsafe trait VTableSubset<B>: VTable {
    type Subset: VTable<Bounds = B>;

    // Required method
    fn into_subset(self) -> Self::Subset;
}
Expand description

Convert vtable into a vtable with less dynamic trait bounds.

§Safety

The type the vtable describes must not change.

Required Associated Types§

Source

type Subset: VTable<Bounds = B>

The type of the new vtable.

Required Methods§

Source

fn into_subset(self) -> Self::Subset

Convert a vtable.

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, B: IsBound, Bnew> VTableSubset<Bnew> for &'a LifetimeVTable<'b, B>
where Bnew: Subset<B> + IsBound,

Source§

type Subset = &'a LifetimeVTable<'b, Bnew>

Source§

impl<'a, B: IsBound, Bnew> VTableSubset<Bnew> for &'a StaticVTable<B>
where Bnew: Subset<B> + IsBound,

Source§

type Subset = &'a StaticVTable<Bnew>

Source§

impl<'a, B: IsBound, Bnew> VTableSubset<Bnew> for LifetimeVTable<'a, B>
where Bnew: Subset<B> + IsBound,

Source§

impl<'a, T: VTable, Bnew: IsBound> VTableSubset<Bnew> for Unaligned<&'a T>
where &'a T: VTableSubset<Bnew>, <&'a T as VTableSubset<Bnew>>::Subset: Copy, Unaligned<<&'a T as VTableSubset<Bnew>>::Subset>: VTable<Bounds = Bnew>,

Source§

impl<B: IsBound, Bnew> VTableSubset<Bnew> for StaticVTable<B>
where Bnew: Subset<B> + IsBound,