For example:
struct ABC;
impl ABC {
fn some_method(&self) -> &str {
// return the name of its struct -> "ABC"
}
}
I'm writing Python extensions and I need a way to return the current struct's name for its repr
method. In Python, I can get this using self.__class__.__name__
. Is there anything similar in Rust?