#[non_exhaustive]#[repr(C)]pub struct ValueVTable {Show 16 fields
pub type_name: TypeNameFn,
pub marker_traits: MarkerTraits,
pub drop_in_place: Option<DropInPlaceFn>,
pub invariants: Option<InvariantsFn>,
pub display: Option<DisplayFn>,
pub debug: Option<DebugFn>,
pub default_in_place: Option<DefaultInPlaceFn>,
pub clone_into: Option<CloneIntoFn>,
pub eq: Option<PartialEqFn>,
pub partial_ord: Option<PartialOrdFn>,
pub ord: Option<CmpFn>,
pub hash: Option<HashFn>,
pub parse: Option<ParseFn>,
pub try_from: Option<TryFromFn>,
pub try_into_inner: Option<TryIntoInnerFn>,
pub try_borrow_inner: 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
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.type_name: TypeNameFncf. TypeNameFn
marker_traits: MarkerTraitsMarker traits implemented by the type
drop_in_place: Option<DropInPlaceFn>cf. DropInPlaceFn — if None, drops without side-effects
invariants: Option<InvariantsFn>cf. InvariantsFn
display: Option<DisplayFn>cf. DisplayFn
debug: Option<DebugFn>cf. DebugFn
default_in_place: Option<DefaultInPlaceFn>cf. DefaultInPlaceFn
clone_into: Option<CloneIntoFn>cf. CloneIntoFn
eq: Option<PartialEqFn>cf. PartialEqFn for equality comparison
partial_ord: Option<PartialOrdFn>cf. PartialOrdFn for partial ordering comparison
ord: Option<CmpFn>cf. CmpFn for total ordering
hash: Option<HashFn>cf. HashFn
parse: Option<ParseFn>cf. ParseFn
try_from: 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: 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: 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 const fn builder<T>() -> ValueVTableBuilder<T>
pub const fn builder<T>() -> ValueVTableBuilder<T>
Creates a new ValueVTableBuilder
Trait Implementations§
Source§impl Clone for ValueVTable
impl Clone for ValueVTable
Source§fn clone(&self) -> ValueVTable
fn clone(&self) -> ValueVTable
Returns a copy 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 ValueVTable
impl Debug for ValueVTable
Source§impl Hash for ValueVTable
impl Hash for ValueVTable
Source§impl PartialEq for ValueVTable
impl PartialEq for ValueVTable
impl Copy for ValueVTable
impl Eq for ValueVTable
impl StructuralPartialEq for ValueVTable
Auto Trait Implementations§
impl Freeze for ValueVTable
impl RefUnwindSafe for ValueVTable
impl Send for ValueVTable
impl Sync for ValueVTable
impl Unpin for ValueVTable
impl UnwindSafe for ValueVTable
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