Skip to main content

box_leak_new

Function box_leak_new 

Source
pub fn box_leak_new<T>(data: T) -> &'static mut T
Expand description

Creates a new boxed value and leaks it, returning a static mutable reference.

§Arguments

  • T - The data type to be boxed and leaked.

§Returns

  • &'static mut T - A static mutable reference to the leaked value.