pub unsafe fn altrep_region_buf<T>(buf: *mut T, len: usize) -> &'static mut [T]Expand description
Create a mutable slice from an ALTREP get_region output buffer pointer.
Called by the bridge trampolines (altrep_bridge.rs) to convert the raw
*mut T buffer from R’s ALTREP dispatch into a &mut [T] before passing
it to the trait methods.
§Safety
bufmust be a valid, aligned, writable pointer to at leastlenelements ofT.- The caller must ensure no aliasing references to the same memory exist.
- This is guaranteed when called from R’s ALTREP
Get_regiondispatch, which provides a freshly allocated buffer.