| Crates.io | crate-paths-macros |
| lib.rs | crate-paths-macros |
| version | 0.1.1 |
| created_at | 2025-06-27 15:22:30.418886+00 |
| updated_at | 2025-06-27 16:55:54.606555+00 |
| description | Optional macros library for crate-paths |
| homepage | |
| repository | https://github.com/stayhydated/crate-paths |
| max_upload_size | |
| id | 1728834 |
| size | 8,007 |
Usage:
path!(std::sync::Arc);
This expands to
#[allow(non_upper_case_globals)]
pub const Arc: crate_paths::Path = {
#[allow(unused_imports)]
use std::sync::Arc as _;
crate_paths::Path::new("std::sync::Arc")
};
Usage:
path_val!(std::sync::Arc);
This expands to:
{
#[allow(unused_imports)]
use std::sync::Arc as _;
crate_paths::Path::new("std::sync::Arc")
}
Which you would later assign to a constant:
const SOME_CONSTANT: crate_paths::Path = path_val!("std::sync::Arc");