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 valueT
and provides references to it with checking withdebug_assertions
.- Manually
Static Ptr ManuallyStaticPtr<T>
allocates a valueT
on the heap and provides a raw pointer to it. It requires manual deallocation via thefree
method.- Manually
Static Ref - A reference to the value held by
ManuallyStatic<T>
. In debug builds, it panics if dereferenced after the originalManuallyStatic
has been dropped.