typeless

unsafe API for type erasure on the stack

Usage

Add the following to your Cargo.toml

toml [dependencies] typeless = "0.1"

Storing any value x of type T in TypeErased completely destroys all type data associated with it.

Restrictions

While this erases all type data, leaving only the pure bytes, the compiler still requires 2 things:

Access

Since there is no type data anymore, any access to the inner data is unsafe (except getting the bytes directly)

TypeErased is not Send nor Sync since it can't be known if that's safe

License

This project is licensed under either of

at your option.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.