From 07aa59a122cc5e14d2fb2e2c6e3d8f82e4397bde Mon Sep 17 00:00:00 2001 From: HampusM Date: Wed, 14 Aug 2024 20:05:30 +0200 Subject: feat(ecs): add component added event --- ecs/src/type_name.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'ecs/src/type_name.rs') diff --git a/ecs/src/type_name.rs b/ecs/src/type_name.rs index 5892c6f..54179be 100644 --- a/ecs/src/type_name.rs +++ b/ecs/src/type_name.rs @@ -1,5 +1,15 @@ +use std::any::type_name; + pub trait TypeName { /// Returns the name of this type. fn type_name(&self) -> &'static str; } + +impl TypeName for Vec +{ + fn type_name(&self) -> &'static str + { + type_name::() + } +} -- cgit v1.2.3-18-g5258