Crates.io | rkyv_typename |
lib.rs | rkyv_typename |
version | 0.7.44 |
source | src |
created_at | 2020-11-11 16:13:44.036343 |
updated_at | 2024-02-04 02:40:13.618783 |
description | Customizable naming for types |
homepage | |
repository | https://github.com/rkyv/rkyv |
max_upload_size | |
id | 311281 |
size | 19,234 |
rkyv_typename adds type names for rkyv_dyn.
use rkyv_typename::TypeName;
#[derive(TypeName)]
#[typename = "CoolType"]
struct Example<T>(T);
fn main() {
let mut type_name = String::new();
Example::<i32>::build_type_name(|piece| type_name += piece);
assert_eq!(type_name, "CoolType<i32>");
}