pub trait MutInPlaceValue: Value {
type BaseRefType: Debug + ?Sized;
// Required methods
fn initialize(data: &mut [u8]);
fn from_bytes_mut(data: &mut [u8]) -> &mut Self::BaseRefType;
}
Expand description
Implementing this trait indicates that the type can be mutated in-place as a &mut u8. This enables the .insert_reserve() method on Table
Required Associated Types§
Sourcetype BaseRefType: Debug + ?Sized
type BaseRefType: Debug + ?Sized
The base type such that &mut u8 can be safely transmuted to &mut BaseRefType
Required Methods§
fn initialize(data: &mut [u8])
fn from_bytes_mut(data: &mut [u8]) -> &mut Self::BaseRefType
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.