# x-variant [![Version](https://img.shields.io/crates/v/x-variant)](https://crates.io/crates/x-variant) [![Documentation](https://docs.rs/x-variant/badge.svg)](https://docs.rs/x-variant) [![License](https://img.shields.io/badge/License-Apache%202-blue.svg)](LICENSE-APACHE) [![License](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE-MIT) Variant is a dynamic type container that can hold any type of value, and can change the type at runtime. ## Example ```toml [dependencies] x-variant= "0.1" ``` ```rust use x_variant::Variant; let mut v = Variant::new(); v.set(12); i: i32 = v.get(); v.set("Hello, world!"); // Array let mut v = Variant::new(); v[100] = "test".into(); // Dictionary let mut v = Variant::new(); v["key"] = "value".into(); v["x"]["y"] = 3.1415926f64.into(); ```