#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

#282 in Rust patterns

Download history 640/week @ 2024-07-08 740/week @ 2024-07-15 685/week @ 2024-07-22 459/week @ 2024-07-29 386/week @ 2024-08-05 353/week @ 2024-08-12 590/week @ 2024-08-19 666/week @ 2024-08-26 578/week @ 2024-09-02 734/week @ 2024-09-09 794/week @ 2024-09-16 752/week @ 2024-09-23 1742/week @ 2024-09-30 2644/week @ 2024-10-07 2318/week @ 2024-10-14 1087/week @ 2024-10-21

7,904 downloads per month
Used in 23 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.5–1MB
~22K SLoC