#[non_exhaustive]#[repr(C)]pub struct ValueVTable {Show 16 fields
pub type_name: TypeNameFn,
pub marker_traits: fn() -> MarkerTraits,
pub drop_in_place: fn() -> Option<DropInPlaceFn>,
pub invariants: fn() -> Option<InvariantsFn>,
pub display: fn() -> Option<DisplayFn>,
pub debug: fn() -> Option<DebugFn>,
pub default_in_place: fn() -> Option<DefaultInPlaceFn>,
pub clone_into: fn() -> Option<CloneIntoFn>,
pub partial_eq: fn() -> Option<PartialEqFn>,
pub partial_ord: fn() -> Option<PartialOrdFn>,
pub ord: fn() -> Option<CmpFn>,
pub hash: fn() -> Option<HashFn>,
pub parse: fn() -> Option<ParseFn>,
pub try_from: fn() -> Option<TryFromFn>,
pub try_into_inner: fn() -> Option<TryIntoInnerFn>,
pub try_borrow_inner: fn() -> Option<TryBorrowInnerFn>,
}Expand description
VTable for common operations that can be performed on any shape
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.type_name: TypeNameFncf. TypeNameFn
marker_traits: fn() -> MarkerTraitsMarker traits implemented by the type
drop_in_place: fn() -> Option<DropInPlaceFn>cf. DropInPlaceFn — if None, drops without side-effects
invariants: fn() -> Option<InvariantsFn>cf. InvariantsFn
display: fn() -> Option<DisplayFn>cf. DisplayFn
debug: fn() -> Option<DebugFn>cf. DebugFn
default_in_place: fn() -> Option<DefaultInPlaceFn>cf. DefaultInPlaceFn
clone_into: fn() -> Option<CloneIntoFn>cf. CloneIntoFn
partial_eq: fn() -> Option<PartialEqFn>cf. PartialEqFn for equality comparison
partial_ord: fn() -> Option<PartialOrdFn>cf. PartialOrdFn for partial ordering comparison
ord: fn() -> Option<CmpFn>cf. CmpFn for total ordering
hash: fn() -> Option<HashFn>cf. HashFn
parse: fn() -> Option<ParseFn>cf. ParseFn
try_from: fn() -> Option<TryFromFn>cf. TryFromFn
This also acts as a “TryFromInner” — you can use it to go:
String=>Utf8PathBufString=>UuidT=>Option<T>T=>Arc<T>T=>NonZero<T>- etc.
try_into_inner: fn() -> Option<TryIntoInnerFn>cf. TryIntoInnerFn
This is used by transparent types to convert the wrapper type into its inner value. Primarily used during serialization.
try_borrow_inner: fn() -> Option<TryBorrowInnerFn>cf. TryBorrowInnerFn
This is used by transparent types to efficiently access the inner value without copying.
Implementations§
Source§impl ValueVTable
impl ValueVTable
Sourcepub fn marker_traits(&self) -> MarkerTraits
pub fn marker_traits(&self) -> MarkerTraits
Get the marker traits implemented for the type
Sourcepub fn is_unwind_safe(&self) -> bool
pub fn is_unwind_safe(&self) -> bool
Check if the type implements the UnwindSafe marker trait
Sourcepub fn is_ref_unwind_safe(&self) -> bool
pub fn is_ref_unwind_safe(&self) -> bool
Check if the type implements the RefUnwindSafe marker trait
Sourcepub const fn builder<T>() -> ValueVTableBuilder<T>
pub const fn builder<T>() -> ValueVTableBuilder<T>
Creates a new ValueVTableBuilder
Sourcepub const fn builder_unsized<T: ?Sized>() -> ValueVTableBuilderUnsized<T>
pub const fn builder_unsized<T: ?Sized>() -> ValueVTableBuilderUnsized<T>
Creates a new ValueVTableBuilderUnsized
Trait Implementations§
Source§impl Clone for ValueVTable
impl Clone for ValueVTable
Source§fn clone(&self) -> ValueVTable
fn clone(&self) -> ValueVTable
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more