pub trait StoreData<Impl: ImplDetails> {
    // Required method
    unsafe fn store_data<T: StoreRequirements>(
        &mut self,
        data: *mut T,
        layout: Layout
    ) -> <Impl as StorageDetails>::StoreResult<T>;
}
Expand description

Trait for specializing store function across implementations.

Required Methods§

source

unsafe fn store_data<T: StoreRequirements>( &mut self, data: *mut T, layout: Layout ) -> <Impl as StorageDetails>::StoreResult<T>

Works same as store but takes a pointer and layout.

Pointer type is used to deduce the destruction behavior for implementations that return a reference, but can be disabled by casting the provided pointer into *mut () type and then calling core::mem::transmute on the returned reference.

Implementors§