macro_rules! ty {
($type:ty) => { ... };
(full: $type:ty) => { ... };
}Expand description
Creates a Type attachment for the specified type.
This macro provides a convenient way to create type attachments for error reports. The type attachment shows the type name in error messages, which is useful for debugging type-related issues or showing what types were involved in an operation.
§Example
use std::path::PathBuf;
use bigerror::{ty, Type};
// Create type attachments for built-in types
let num_type = ty!(PathBuf);
assert_eq!(*num_type, "PathBuf");
let num_type = ty!(full: PathBuf);
assert_eq!(*num_type, "std::path::PathBuf");