Trait redb::MutInPlaceValue
source · 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
Object Safety§
This trait is not object safe.