Crate fuckit

Crate fuckit 

Source
Expand description

Convenient ways to shoot yourself in the foot.

Functions§

grapple
Given any pointer, even an immutable one with a short lifetime, returns a mutable pointer of unbounded 'static lifetime to the same underlying address.
immortalize
Given a statically-sized value, allocates new memory for it which will never be freed and moves (or copies) the value to that memory, where it will have an unbounded 'static lifetime, and returns a mutable reference. This leaks memory.
summon
Allocates (but does not initialize) space for a value of type T which will never be freed, so it can have a unbounded 'static lifetime. This leaks memory.
summon_clones
Allocates space for a slice of len clones/copies of value, which will never be freed, so they can have unbounded 'static lifetimes. This leaks memory.
summon_many
Allocates (but does not initialize) space for a slice of len values of type T which will never be freed, so they can have unbounded 'static lifetimes. This leaks memory.