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§

source

type BaseRefType: Debug + ?Sized

The base type such that &mut u8 can be safely transmuted to &mut BaseRefType

Required Methods§

source

fn initialize(data: &mut [u8])

source

fn from_bytes_mut(data: &mut [u8]) -> &mut Self::BaseRefType

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl MutInPlaceValue for &[u8]

source§

type BaseRefType = [u8]

source§

fn initialize(_data: &mut [u8])

source§

fn from_bytes_mut(data: &mut [u8]) -> &mut Self::BaseRefType

Implementors§