#[repr(C)]pub struct GenericValue {
pub opaque: [MaybeUninit<u64>; 4],
}Expand description
An opaque generic runtime value.
This is the host’s 32-byte Value bit-copied - discriminant and payload
included. Plugins must never inspect or fabricate its bytes; values are
opaque handles to be passed back to host callbacks. Use
HostApi::value_kind to ask what a value holds.
Fields§
§opaque: [MaybeUninit<u64>; 4]Opaque storage. The limbs are MaybeUninit because a host Value
does not initialize all 32 bytes - small enum variants leave the
rest unwritten - and bit-copying it in must not assert those bytes
are initialized (that would be undefined behavior). u64 limbs give
the type the host Value’s 8-byte alignment; it renders as
uint64_t opaque[4] in C. Never inspect.
Trait Implementations§
Source§impl Clone for GenericValue
impl Clone for GenericValue
Source§fn clone(&self) -> GenericValue
fn clone(&self) -> GenericValue
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for GenericValue
Auto Trait Implementations§
impl Freeze for GenericValue
impl RefUnwindSafe for GenericValue
impl Send for GenericValue
impl Sync for GenericValue
impl Unpin for GenericValue
impl UnsafeUnpin for GenericValue
impl UnwindSafe for GenericValue
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