pub struct StaticVTable<B> { /* private fields */ }Expand description
Implementation of VTable for 'static types.
Static instances of StaticVTable can be made automatically for any type
using the VTableOf or ConstVTableOf trait. These instances are created using automatic static
promotion and therefore have no runtime overhead to create them.
§Examples
use dungeon_cell::vtable::{StaticVTable, VTableOf, VTable};
use dungeon_cell::bound::bounds;
// get vtable for i32
let vtable = StaticVTable::<bounds::Normal>::new::<i32>();
assert_eq!(vtable.descriptor().type_name(), "i32");
assert_eq!(vtable.descriptor().size(), 4);
assert_eq!(vtable.descriptor().alignment(), 4);
// get static vtable for f64
let vtable = <&'static StaticVTable<bounds::Normal> as VTableOf<f64>>::instance();
assert_eq!(vtable.descriptor().type_name(), "f64");
assert_eq!(vtable.descriptor().size(), 8);
assert_eq!(vtable.descriptor().alignment(), 8);Implementations§
Trait Implementations§
Source§impl<B: Clone> Clone for StaticVTable<B>
impl<B: Clone> Clone for StaticVTable<B>
Source§fn clone(&self) -> StaticVTable<B>
fn clone(&self) -> StaticVTable<B>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a, T, B: IsBound> ConstVTableOf<T> for &'a StaticVTable<B>where
T: Dynamic<B> + 'static,
impl<'a, T, B: IsBound> ConstVTableOf<T> for &'a StaticVTable<B>where
T: Dynamic<B> + 'static,
Source§impl<T, B: IsBound> ConstVTableOf<T> for StaticVTable<B>where
T: Dynamic<B> + 'static,
impl<T, B: IsBound> ConstVTableOf<T> for StaticVTable<B>where
T: Dynamic<B> + 'static,
Source§impl<B> Debug for StaticVTable<B>
impl<B> Debug for StaticVTable<B>
Source§impl<B: IsBound> VTable for StaticVTable<B>
impl<B: IsBound> VTable for StaticVTable<B>
Source§fn descriptor(&self) -> &Descriptor<Self::Id>
fn descriptor(&self) -> &Descriptor<Self::Id>
Get the type descriptor. Read more
Source§fn bound_impl(&self) -> &BoundsImpl<Self::Bounds>
fn bound_impl(&self) -> &BoundsImpl<Self::Bounds>
Get the bound implementation. Read more
Source§impl<'a, B: IsBound, Bnew> VTableSubset<Bnew> for &'a StaticVTable<B>
impl<'a, B: IsBound, Bnew> VTableSubset<Bnew> for &'a StaticVTable<B>
Source§type Subset = &'a StaticVTable<Bnew>
type Subset = &'a StaticVTable<Bnew>
The type of the new vtable.
Source§fn into_subset(self) -> Self::Subset
fn into_subset(self) -> Self::Subset
Convert a vtable.
Source§impl<B: IsBound, Bnew> VTableSubset<Bnew> for StaticVTable<B>
impl<B: IsBound, Bnew> VTableSubset<Bnew> for StaticVTable<B>
Source§type Subset = StaticVTable<Bnew>
type Subset = StaticVTable<Bnew>
The type of the new vtable.
Source§fn into_subset(self) -> Self::Subset
fn into_subset(self) -> Self::Subset
Convert a vtable.
Auto Trait Implementations§
impl<B> Freeze for StaticVTable<B>
impl<B> RefUnwindSafe for StaticVTable<B>where
B: RefUnwindSafe,
impl<B> Send for StaticVTable<B>where
B: Send,
impl<B> Sync for StaticVTable<B>where
B: Sync,
impl<B> Unpin for StaticVTable<B>where
B: Unpin,
impl<B> UnwindSafe for StaticVTable<B>where
B: UnwindSafe,
Blanket Implementations§
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> Dynamic<Bound<Send, Sync, __, Clone, Unpin, Debug>> for T
impl<T> Dynamic<Bound<Send, Sync, __, Clone, Unpin, Debug>> for T
Source§unsafe fn clone_unchecked(this: &T) -> T
unsafe fn clone_unchecked(this: &T) -> T
Unsafe form of
Self::clone(). Read moreSource§unsafe fn debug_unchecked(this: &T, f: &mut Formatter<'_>) -> Result<(), Error>
unsafe fn debug_unchecked(this: &T, f: &mut Formatter<'_>) -> Result<(), Error>
Unsafe form of
Self::debug(). Read moreSource§impl<T> Dynamic<Bound<Send, Sync, __, Clone, Unpin, __>> for T
impl<T> Dynamic<Bound<Send, Sync, __, Clone, Unpin, __>> for T
Source§unsafe fn clone_unchecked(this: &T) -> T
unsafe fn clone_unchecked(this: &T) -> T
Unsafe form of
Self::clone(). Read moreSource§unsafe fn debug_unchecked(
_this: &T,
_f: &mut Formatter<'_>,
) -> Result<(), Error>
unsafe fn debug_unchecked( _this: &T, _f: &mut Formatter<'_>, ) -> Result<(), Error>
Unsafe form of
Self::debug(). Read moreSource§impl<T> Dynamic<Bound<Send, Sync, __, Clone, __, Debug>> for T
impl<T> Dynamic<Bound<Send, Sync, __, Clone, __, Debug>> for T
Source§unsafe fn clone_unchecked(this: &T) -> T
unsafe fn clone_unchecked(this: &T) -> T
Unsafe form of
Self::clone(). Read moreSource§unsafe fn debug_unchecked(this: &T, f: &mut Formatter<'_>) -> Result<(), Error>
unsafe fn debug_unchecked(this: &T, f: &mut Formatter<'_>) -> Result<(), Error>
Unsafe form of
Self::debug(). Read moreSource§impl<T> Dynamic<Bound<Send, Sync, __, Clone, __, __>> for T
impl<T> Dynamic<Bound<Send, Sync, __, Clone, __, __>> for T
Source§unsafe fn clone_unchecked(this: &T) -> T
unsafe fn clone_unchecked(this: &T) -> T
Unsafe form of
Self::clone(). Read moreSource§unsafe fn debug_unchecked(
_this: &T,
_f: &mut Formatter<'_>,
) -> Result<(), Error>
unsafe fn debug_unchecked( _this: &T, _f: &mut Formatter<'_>, ) -> Result<(), Error>
Unsafe form of
Self::debug(). Read moreSource§impl<T> Dynamic<Bound<Send, Sync, __, __, Unpin, Debug>> for T
impl<T> Dynamic<Bound<Send, Sync, __, __, Unpin, Debug>> for T
Source§unsafe fn clone_unchecked(_this: &T) -> T
unsafe fn clone_unchecked(_this: &T) -> T
Unsafe form of
Self::clone(). Read moreSource§unsafe fn debug_unchecked(this: &T, f: &mut Formatter<'_>) -> Result<(), Error>
unsafe fn debug_unchecked(this: &T, f: &mut Formatter<'_>) -> Result<(), Error>
Unsafe form of
Self::debug(). Read moreSource§impl<T> Dynamic<Bound<Send, Sync, __, __, Unpin, __>> for T
impl<T> Dynamic<Bound<Send, Sync, __, __, Unpin, __>> for T
Source§unsafe fn clone_unchecked(_this: &T) -> T
unsafe fn clone_unchecked(_this: &T) -> T
Unsafe form of
Self::clone(). Read moreSource§unsafe fn debug_unchecked(
_this: &T,
_f: &mut Formatter<'_>,
) -> Result<(), Error>
unsafe fn debug_unchecked( _this: &T, _f: &mut Formatter<'_>, ) -> Result<(), Error>
Unsafe form of
Self::debug(). Read moreSource§impl<T> Dynamic<Bound<Send, Sync, __, __, __, Debug>> for T
impl<T> Dynamic<Bound<Send, Sync, __, __, __, Debug>> for T
Source§unsafe fn clone_unchecked(_this: &T) -> T
unsafe fn clone_unchecked(_this: &T) -> T
Unsafe form of
Self::clone(). Read moreSource§unsafe fn debug_unchecked(this: &T, f: &mut Formatter<'_>) -> Result<(), Error>
unsafe fn debug_unchecked(this: &T, f: &mut Formatter<'_>) -> Result<(), Error>
Unsafe form of
Self::debug(). Read moreSource§impl<T> Dynamic<Bound<Send, Sync, __, __, __, __>> for T
impl<T> Dynamic<Bound<Send, Sync, __, __, __, __>> for T
Source§unsafe fn clone_unchecked(_this: &T) -> T
unsafe fn clone_unchecked(_this: &T) -> T
Unsafe form of
Self::clone(). Read moreSource§unsafe fn debug_unchecked(
_this: &T,
_f: &mut Formatter<'_>,
) -> Result<(), Error>
unsafe fn debug_unchecked( _this: &T, _f: &mut Formatter<'_>, ) -> Result<(), Error>
Unsafe form of
Self::debug(). Read moreSource§impl<T> Dynamic<Bound<Send, __, __, Clone, Unpin, Debug>> for T
impl<T> Dynamic<Bound<Send, __, __, Clone, Unpin, Debug>> for T
Source§unsafe fn clone_unchecked(this: &T) -> T
unsafe fn clone_unchecked(this: &T) -> T
Unsafe form of
Self::clone(). Read moreSource§unsafe fn debug_unchecked(this: &T, f: &mut Formatter<'_>) -> Result<(), Error>
unsafe fn debug_unchecked(this: &T, f: &mut Formatter<'_>) -> Result<(), Error>
Unsafe form of
Self::debug(). Read moreSource§impl<T> Dynamic<Bound<Send, __, __, Clone, Unpin, __>> for T
impl<T> Dynamic<Bound<Send, __, __, Clone, Unpin, __>> for T
Source§unsafe fn clone_unchecked(this: &T) -> T
unsafe fn clone_unchecked(this: &T) -> T
Unsafe form of
Self::clone(). Read moreSource§unsafe fn debug_unchecked(
_this: &T,
_f: &mut Formatter<'_>,
) -> Result<(), Error>
unsafe fn debug_unchecked( _this: &T, _f: &mut Formatter<'_>, ) -> Result<(), Error>
Unsafe form of
Self::debug(). Read moreSource§impl<T> Dynamic<Bound<Send, __, __, Clone, __, Debug>> for T
impl<T> Dynamic<Bound<Send, __, __, Clone, __, Debug>> for T
Source§unsafe fn clone_unchecked(this: &T) -> T
unsafe fn clone_unchecked(this: &T) -> T
Unsafe form of
Self::clone(). Read moreSource§unsafe fn debug_unchecked(this: &T, f: &mut Formatter<'_>) -> Result<(), Error>
unsafe fn debug_unchecked(this: &T, f: &mut Formatter<'_>) -> Result<(), Error>
Unsafe form of
Self::debug(). Read moreSource§impl<T> Dynamic<Bound<Send, __, __, Clone, __, __>> for T
impl<T> Dynamic<Bound<Send, __, __, Clone, __, __>> for T
Source§unsafe fn clone_unchecked(this: &T) -> T
unsafe fn clone_unchecked(this: &T) -> T
Unsafe form of
Self::clone(). Read moreSource§unsafe fn debug_unchecked(
_this: &T,
_f: &mut Formatter<'_>,
) -> Result<(), Error>
unsafe fn debug_unchecked( _this: &T, _f: &mut Formatter<'_>, ) -> Result<(), Error>
Unsafe form of
Self::debug(). Read moreSource§impl<T> Dynamic<Bound<Send, __, __, __, Unpin, Debug>> for T
impl<T> Dynamic<Bound<Send, __, __, __, Unpin, Debug>> for T
Source§unsafe fn clone_unchecked(_this: &T) -> T
unsafe fn clone_unchecked(_this: &T) -> T
Unsafe form of
Self::clone(). Read moreSource§unsafe fn debug_unchecked(this: &T, f: &mut Formatter<'_>) -> Result<(), Error>
unsafe fn debug_unchecked(this: &T, f: &mut Formatter<'_>) -> Result<(), Error>
Unsafe form of
Self::debug(). Read moreSource§impl<T> Dynamic<Bound<Send, __, __, __, Unpin, __>> for T
impl<T> Dynamic<Bound<Send, __, __, __, Unpin, __>> for T
Source§unsafe fn clone_unchecked(_this: &T) -> T
unsafe fn clone_unchecked(_this: &T) -> T
Unsafe form of
Self::clone(). Read moreSource§unsafe fn debug_unchecked(
_this: &T,
_f: &mut Formatter<'_>,
) -> Result<(), Error>
unsafe fn debug_unchecked( _this: &T, _f: &mut Formatter<'_>, ) -> Result<(), Error>
Unsafe form of
Self::debug(). Read moreSource§impl<T> Dynamic<Bound<Send, __, __, __, __, Debug>> for T
impl<T> Dynamic<Bound<Send, __, __, __, __, Debug>> for T
Source§unsafe fn clone_unchecked(_this: &T) -> T
unsafe fn clone_unchecked(_this: &T) -> T
Unsafe form of
Self::clone(). Read moreSource§unsafe fn debug_unchecked(this: &T, f: &mut Formatter<'_>) -> Result<(), Error>
unsafe fn debug_unchecked(this: &T, f: &mut Formatter<'_>) -> Result<(), Error>
Unsafe form of
Self::debug(). Read moreSource§impl<T> Dynamic<Bound<Send, __, __, __, __, __>> for Twhere
T: Send,
impl<T> Dynamic<Bound<Send, __, __, __, __, __>> for Twhere
T: Send,
Source§unsafe fn clone_unchecked(_this: &T) -> T
unsafe fn clone_unchecked(_this: &T) -> T
Unsafe form of
Self::clone(). Read moreSource§unsafe fn debug_unchecked(
_this: &T,
_f: &mut Formatter<'_>,
) -> Result<(), Error>
unsafe fn debug_unchecked( _this: &T, _f: &mut Formatter<'_>, ) -> Result<(), Error>
Unsafe form of
Self::debug(). Read moreSource§impl<T> Dynamic<Bound<__, Sync, __, Clone, Unpin, Debug>> for T
impl<T> Dynamic<Bound<__, Sync, __, Clone, Unpin, Debug>> for T
Source§unsafe fn clone_unchecked(this: &T) -> T
unsafe fn clone_unchecked(this: &T) -> T
Unsafe form of
Self::clone(). Read moreSource§unsafe fn debug_unchecked(this: &T, f: &mut Formatter<'_>) -> Result<(), Error>
unsafe fn debug_unchecked(this: &T, f: &mut Formatter<'_>) -> Result<(), Error>
Unsafe form of
Self::debug(). Read moreSource§impl<T> Dynamic<Bound<__, Sync, __, Clone, Unpin, __>> for T
impl<T> Dynamic<Bound<__, Sync, __, Clone, Unpin, __>> for T
Source§unsafe fn clone_unchecked(this: &T) -> T
unsafe fn clone_unchecked(this: &T) -> T
Unsafe form of
Self::clone(). Read moreSource§unsafe fn debug_unchecked(
_this: &T,
_f: &mut Formatter<'_>,
) -> Result<(), Error>
unsafe fn debug_unchecked( _this: &T, _f: &mut Formatter<'_>, ) -> Result<(), Error>
Unsafe form of
Self::debug(). Read moreSource§impl<T> Dynamic<Bound<__, Sync, __, Clone, __, Debug>> for T
impl<T> Dynamic<Bound<__, Sync, __, Clone, __, Debug>> for T
Source§unsafe fn clone_unchecked(this: &T) -> T
unsafe fn clone_unchecked(this: &T) -> T
Unsafe form of
Self::clone(). Read moreSource§unsafe fn debug_unchecked(this: &T, f: &mut Formatter<'_>) -> Result<(), Error>
unsafe fn debug_unchecked(this: &T, f: &mut Formatter<'_>) -> Result<(), Error>
Unsafe form of
Self::debug(). Read moreSource§impl<T> Dynamic<Bound<__, Sync, __, Clone, __, __>> for T
impl<T> Dynamic<Bound<__, Sync, __, Clone, __, __>> for T
Source§unsafe fn clone_unchecked(this: &T) -> T
unsafe fn clone_unchecked(this: &T) -> T
Unsafe form of
Self::clone(). Read moreSource§unsafe fn debug_unchecked(
_this: &T,
_f: &mut Formatter<'_>,
) -> Result<(), Error>
unsafe fn debug_unchecked( _this: &T, _f: &mut Formatter<'_>, ) -> Result<(), Error>
Unsafe form of
Self::debug(). Read moreSource§impl<T> Dynamic<Bound<__, Sync, __, __, Unpin, Debug>> for T
impl<T> Dynamic<Bound<__, Sync, __, __, Unpin, Debug>> for T
Source§unsafe fn clone_unchecked(_this: &T) -> T
unsafe fn clone_unchecked(_this: &T) -> T
Unsafe form of
Self::clone(). Read moreSource§unsafe fn debug_unchecked(this: &T, f: &mut Formatter<'_>) -> Result<(), Error>
unsafe fn debug_unchecked(this: &T, f: &mut Formatter<'_>) -> Result<(), Error>
Unsafe form of
Self::debug(). Read moreSource§impl<T> Dynamic<Bound<__, Sync, __, __, Unpin, __>> for T
impl<T> Dynamic<Bound<__, Sync, __, __, Unpin, __>> for T
Source§unsafe fn clone_unchecked(_this: &T) -> T
unsafe fn clone_unchecked(_this: &T) -> T
Unsafe form of
Self::clone(). Read moreSource§unsafe fn debug_unchecked(
_this: &T,
_f: &mut Formatter<'_>,
) -> Result<(), Error>
unsafe fn debug_unchecked( _this: &T, _f: &mut Formatter<'_>, ) -> Result<(), Error>
Unsafe form of
Self::debug(). Read moreSource§impl<T> Dynamic<Bound<__, Sync, __, __, __, Debug>> for T
impl<T> Dynamic<Bound<__, Sync, __, __, __, Debug>> for T
Source§unsafe fn clone_unchecked(_this: &T) -> T
unsafe fn clone_unchecked(_this: &T) -> T
Unsafe form of
Self::clone(). Read moreSource§unsafe fn debug_unchecked(this: &T, f: &mut Formatter<'_>) -> Result<(), Error>
unsafe fn debug_unchecked(this: &T, f: &mut Formatter<'_>) -> Result<(), Error>
Unsafe form of
Self::debug(). Read moreSource§impl<T> Dynamic<Bound<__, Sync, __, __, __, __>> for Twhere
T: Sync,
impl<T> Dynamic<Bound<__, Sync, __, __, __, __>> for Twhere
T: Sync,
Source§unsafe fn clone_unchecked(_this: &T) -> T
unsafe fn clone_unchecked(_this: &T) -> T
Unsafe form of
Self::clone(). Read moreSource§unsafe fn debug_unchecked(
_this: &T,
_f: &mut Formatter<'_>,
) -> Result<(), Error>
unsafe fn debug_unchecked( _this: &T, _f: &mut Formatter<'_>, ) -> Result<(), Error>
Unsafe form of
Self::debug(). Read moreSource§impl<T> Dynamic<Bound<__, __, __, Clone, Unpin, Debug>> for T
impl<T> Dynamic<Bound<__, __, __, Clone, Unpin, Debug>> for T
Source§unsafe fn clone_unchecked(this: &T) -> T
unsafe fn clone_unchecked(this: &T) -> T
Unsafe form of
Self::clone(). Read moreSource§unsafe fn debug_unchecked(this: &T, f: &mut Formatter<'_>) -> Result<(), Error>
unsafe fn debug_unchecked(this: &T, f: &mut Formatter<'_>) -> Result<(), Error>
Unsafe form of
Self::debug(). Read moreSource§impl<T> Dynamic<Bound<__, __, __, Clone, Unpin, __>> for T
impl<T> Dynamic<Bound<__, __, __, Clone, Unpin, __>> for T
Source§unsafe fn clone_unchecked(this: &T) -> T
unsafe fn clone_unchecked(this: &T) -> T
Unsafe form of
Self::clone(). Read moreSource§unsafe fn debug_unchecked(
_this: &T,
_f: &mut Formatter<'_>,
) -> Result<(), Error>
unsafe fn debug_unchecked( _this: &T, _f: &mut Formatter<'_>, ) -> Result<(), Error>
Unsafe form of
Self::debug(). Read moreSource§impl<T> Dynamic<Bound<__, __, __, Clone, __, Debug>> for T
impl<T> Dynamic<Bound<__, __, __, Clone, __, Debug>> for T
Source§unsafe fn clone_unchecked(this: &T) -> T
unsafe fn clone_unchecked(this: &T) -> T
Unsafe form of
Self::clone(). Read moreSource§unsafe fn debug_unchecked(this: &T, f: &mut Formatter<'_>) -> Result<(), Error>
unsafe fn debug_unchecked(this: &T, f: &mut Formatter<'_>) -> Result<(), Error>
Unsafe form of
Self::debug(). Read moreSource§impl<T> Dynamic<Bound<__, __, __, Clone, __, __>> for Twhere
T: Clone,
impl<T> Dynamic<Bound<__, __, __, Clone, __, __>> for Twhere
T: Clone,
Source§unsafe fn clone_unchecked(this: &T) -> T
unsafe fn clone_unchecked(this: &T) -> T
Unsafe form of
Self::clone(). Read moreSource§unsafe fn debug_unchecked(
_this: &T,
_f: &mut Formatter<'_>,
) -> Result<(), Error>
unsafe fn debug_unchecked( _this: &T, _f: &mut Formatter<'_>, ) -> Result<(), Error>
Unsafe form of
Self::debug(). Read moreSource§impl<T> Dynamic<Bound<__, __, __, __, Unpin, Debug>> for T
impl<T> Dynamic<Bound<__, __, __, __, Unpin, Debug>> for T
Source§unsafe fn clone_unchecked(_this: &T) -> T
unsafe fn clone_unchecked(_this: &T) -> T
Unsafe form of
Self::clone(). Read moreSource§unsafe fn debug_unchecked(this: &T, f: &mut Formatter<'_>) -> Result<(), Error>
unsafe fn debug_unchecked(this: &T, f: &mut Formatter<'_>) -> Result<(), Error>
Unsafe form of
Self::debug(). Read moreSource§impl<T> Dynamic<Bound<__, __, __, __, Unpin, __>> for Twhere
T: Unpin,
impl<T> Dynamic<Bound<__, __, __, __, Unpin, __>> for Twhere
T: Unpin,
Source§unsafe fn clone_unchecked(_this: &T) -> T
unsafe fn clone_unchecked(_this: &T) -> T
Unsafe form of
Self::clone(). Read moreSource§unsafe fn debug_unchecked(
_this: &T,
_f: &mut Formatter<'_>,
) -> Result<(), Error>
unsafe fn debug_unchecked( _this: &T, _f: &mut Formatter<'_>, ) -> Result<(), Error>
Unsafe form of
Self::debug(). Read moreSource§impl<T> Dynamic<Bound<__, __, __, __, __, Debug>> for Twhere
T: Debug,
impl<T> Dynamic<Bound<__, __, __, __, __, Debug>> for Twhere
T: Debug,
Source§unsafe fn clone_unchecked(_this: &T) -> T
unsafe fn clone_unchecked(_this: &T) -> T
Unsafe form of
Self::clone(). Read moreSource§unsafe fn debug_unchecked(this: &T, f: &mut Formatter<'_>) -> Result<(), Error>
unsafe fn debug_unchecked(this: &T, f: &mut Formatter<'_>) -> Result<(), Error>
Unsafe form of
Self::debug(). Read moreSource§impl<T> Dynamic<Bound<__, __, __, __, __, __>> for T
impl<T> Dynamic<Bound<__, __, __, __, __, __>> for T
Source§unsafe fn clone_unchecked(_this: &T) -> T
unsafe fn clone_unchecked(_this: &T) -> T
Unsafe form of
Self::clone(). Read moreSource§unsafe fn debug_unchecked(
_this: &T,
_f: &mut Formatter<'_>,
) -> Result<(), Error>
unsafe fn debug_unchecked( _this: &T, _f: &mut Formatter<'_>, ) -> Result<(), Error>
Unsafe form of
Self::debug(). Read more