#phantom-data #send-sync #send #sync #unpin #restrictions

no-std phantom-type

A PhantomData analog which prevents “parameter is never used” error, but does not produce any restrictions in contrast with PhantomData

10 releases

0.5.2 Sep 9, 2024
0.5.1 Sep 8, 2024
0.5.0 Mar 13, 2024
0.4.2 May 24, 2022
0.1.0 Sep 21, 2020

#236 in Rust patterns

Download history 642/week @ 2024-08-24 393/week @ 2024-08-31 916/week @ 2024-09-07 788/week @ 2024-09-14 672/week @ 2024-09-21 1862/week @ 2024-09-28 2654/week @ 2024-10-05 2179/week @ 2024-10-12 1214/week @ 2024-10-19 951/week @ 2024-10-26 1390/week @ 2024-11-02 1132/week @ 2024-11-09 1761/week @ 2024-11-16 1758/week @ 2024-11-23 1663/week @ 2024-11-30 1997/week @ 2024-12-07

7,384 downloads per month
Used in 27 crates (8 directly)

MIT/Apache

4KB

maintenance: passively maintained

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:

Feature flags

Dependencies

~0.4–1MB
~20K SLoC