wildfire 0.0.0

Personal Utils
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// Get and Print Type of Variable
pub fn type_of<T>(_: &T) -> &'static str {
    println!("{}", std::any::type_name::<T>());
    return std::any::type_name::<T>();
}

// Print Generic
pub fn print<T: std::fmt::Debug>(x: &T) {
    println!("{:?}", x);
}

// Pretty-Print Generic
pub fn pprint<T: std::fmt::Debug>(x: &T) {
    println!("{:#?}", x);
}