from_raw_parts_mut in core::slice - Rust (original) (raw)

Function from_raw_parts_mut

1.6.0 (const: 1.83.0) · Source

pub const unsafe fn from_raw_parts_mut<'a, T>(
    data: *mut T,
    len: usize,
) -> &'a mut [T]

Expand description

Performs the same functionality as from_raw_parts, except that a mutable slice is returned.

§Safety

Behavior is undefined if any of the following conditions are violated: