pub enum VTableErased {
Direct(&'static VTableDirect),
Indirect(&'static VTableIndirect),
}Expand description
Type-erased VTable that can hold either Direct or Indirect style.
| Variant | Use Case |
|---|---|
| Direct | Concrete types: scalars, String, derived types |
| Indirect | Generic containers: Vec<T>, Option<T>, Arc<T> |
Variants§
Direct(&'static VTableDirect)
For concrete types with compile-time known traits.
Indirect(&'static VTableIndirect)
For generic containers with runtime trait resolution.
Implementations§
Source§impl VTableErased
impl VTableErased
Sourcepub const fn has_display(&self) -> bool
pub const fn has_display(&self) -> bool
Check if this vtable has a display function.
Sourcepub const fn has_partial_eq(&self) -> bool
pub const fn has_partial_eq(&self) -> bool
Check if this vtable has a partial_eq function.
Sourcepub const fn has_partial_ord(&self) -> bool
pub const fn has_partial_ord(&self) -> bool
Check if this vtable has a partial_cmp function.
Sourcepub const fn has_parse_bytes(&self) -> bool
pub const fn has_parse_bytes(&self) -> bool
Check if this vtable has a parse_bytes function.
Sourcepub const fn has_try_from(&self) -> bool
pub const fn has_try_from(&self) -> bool
Check if this vtable has a try_from function.
Sourcepub const fn has_try_borrow_inner(&self) -> bool
pub const fn has_try_borrow_inner(&self) -> bool
Check if this vtable has a try_borrow_inner function.
Sourcepub const fn has_invariants(&self) -> bool
pub const fn has_invariants(&self) -> bool
Check if this vtable has an invariants function.
Trait Implementations§
Source§impl Clone for VTableErased
impl Clone for VTableErased
Source§fn clone(&self) -> VTableErased
fn clone(&self) -> VTableErased
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 Debug for VTableErased
impl Debug for VTableErased
Source§impl Facet<'_> for VTableErased
impl Facet<'_> for VTableErased
Source§impl From<&'static VTableDirect> for VTableErased
impl From<&'static VTableDirect> for VTableErased
Source§fn from(vt: &'static VTableDirect) -> Self
fn from(vt: &'static VTableDirect) -> Self
Converts to this type from the input type.
Source§impl From<&'static VTableIndirect> for VTableErased
impl From<&'static VTableIndirect> for VTableErased
Source§fn from(vt: &'static VTableIndirect) -> Self
fn from(vt: &'static VTableIndirect) -> Self
Converts to this type from the input type.
impl Copy for VTableErased
Auto Trait Implementations§
impl Freeze for VTableErased
impl RefUnwindSafe for VTableErased
impl Send for VTableErased
impl Sync for VTableErased
impl Unpin for VTableErased
impl UnwindSafe for VTableErased
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