8000 GitHub - DanikVitek/symbol-ty: A crate for declaring type-level strings (symbols)
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

DanikVitek/symbol-ty

Repository files navigation

symbol-ty

Crates.io Docs.rs Crates.io MSRV Crates.io Downloads Crates.io License

A simple crate that allows to create a type that represents a unique symbol.

Usage

Add this to your Cargo.toml:

[dependencies]
symbol-ty = "0.2"

Example

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"),
}

License

Licensed under either of

at your option.

Contribution

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.

About

A crate for declaring type-level strings (symbols)

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Report repository

Releases

No releases published

Packages

No packages published

Languages

0