【Rust】CodeCollection

概述:Rust 代码整理

  1. 打印类型
    1
    2
    3
    4
    // Get the type of given variable, return a string representation of the type  , e.g "i8", "u8", "i32", "u32"
    fn type_of<T>(_: &T) -> String {
    format!("{}", std::any::type_name::<T>())
    }

【Rust】CodeCollection
https://hodlyounger.github.io/B_Code/Rust/【Rust】CodeCollect/
作者
mingming
发布于
2024年8月7日
许可协议