#phantom-data #sync #send #unpin #send-sync #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

8 releases (4 breaking)

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

#974 in Rust patterns

Download history 640/week @ 2024-03-14 732/week @ 2024-03-21 679/week @ 2024-03-28 709/week @ 2024-04-04 737/week @ 2024-04-11 557/week @ 2024-04-18 674/week @ 2024-04-25 498/week @ 2024-05-02 629/week @ 2024-05-09 559/week @ 2024-05-16 760/week @ 2024-05-23 738/week @ 2024-05-30 872/week @ 2024-06-06 1076/week @ 2024-06-13 821/week @ 2024-06-20 351/week @ 2024-06-27

3,253 downloads per month
Used in 16 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:

Crate features

  • "std" Enabled by default. Disable to make the library #![no_std].

Dependencies

~290–780KB
~18K SLoC