Expand description
§ManuallyStatic
ManuallyStatic is a crate that provides a way to simulate a ’static lifetime
where you want runtime checks for use-after-free in debug environments.
Read ManuallyStatic’s documentation
and ManuallyStaticPtr’s documentation for more information.
Structs§
- Manually
Static ManuallyStatic<T>holds a valueTand provides references to it with checking withdebug_assertions.- Manually
Static Ptr ManuallyStaticPtr<T>allocates a valueTon the heap and provides a raw pointer to it. It requires manual deallocation via thefreemethod.- Manually
Static Ref - A reference to the value held by
ManuallyStatic<T>. In debug builds, it panics if dereferenced after the originalManuallyStatichas been dropped.