| Crates.io | symbol-ty |
| lib.rs | symbol-ty |
| version | 0.2.2 |
| created_at | 2025-02-10 23:38:50.975164+00 |
| updated_at | 2025-02-11 11:58:43.14598+00 |
| description | A library for generating symbols as type-level strings. |
| homepage | |
| repository | https://github.com/DanikVitek/symbol-ty |
| max_upload_size | |
| id | 1550808 |
| size | 29,564 |
symbol-tyA simple crate that allows to create a type that represents a unique symbol.
Add this to your Cargo.toml:
[dependencies]
symbol-ty = "0.2"
use symbol_ty::Symbol;
fn main() {
let symbol1 = <Symbol!("foo")>::new();
let symbol2 = <Symbol!("foo")>::new();
assert_eq!(symbol1, symbol2);
println!("{}", symbol1);
println!("{:?}", symbol1);
}
struct Foo {
foo: Symbol!("foo"),
}
Licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.