1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// Copyright 2025 Alecks Gates
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
//! Utility functions for the plexor-core crate
///
/// This function takes a generic type T and returns the last part of its type name
/// by splitting on "::" and taking the last element. This is useful for getting
/// just the struct name without the full module path.
///
/// # Examples
///
/// ```
/// use plexor_core::utils::struct_name_of_type;
///
/// struct MyStruct;
/// assert_eq!(struct_name_of_type::<MyStruct>(), "MyStruct");
/// ```
Sized>