8 releases (4 breaking)
new 0.5.0 | Mar 13, 2024 |
---|---|
0.4.2 | May 24, 2022 |
0.3.1 | Jun 25, 2021 |
0.3.0 | Sep 21, 2020 |
0.1.0 | Sep 21, 2020 |
#1779 in Rust patterns
2,865 downloads per month
Used in 16 crates
(8 directly)
4KB
phantom-type
A PhantomData
analog which prevents "parameter is never used" error,
but does not produce any restrictions in contrast with PhantomData
.
Optional no_std
If your crate has std
feature, use the following method to specify phantom-type
dependency:
[features]
default = ["std"]
std = ["phantom-type/std"]
[dependencies]
phantom-type = { version = "*", default-features = false }
lib.rs
:
Crate features
"std"
Enabled by default. Disable to make the library#![no_std]
.
Dependencies
~0.4–0.9MB
~20K SLoC