QuickVariant
This library is designed with reference to C++'s std::variant
, allowing you to create variants using only type names.
Warning
This library uses unsafe code. Please follow the usage guidelines carefully when using it. Rust's enum is extremely powerful, and in most cases, the functionality provided by this crate can be fully replaced by a simple enum.
Example
// Please be sure to initialize using quickvariant::macros::make_variant!.
let mut variant = make_variant!;
unsafe
println!;
License
QuickVariant is licensed under the MIT license (see LICENSE in the main repository).