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

7 unstable releases

Uses new Rust 2021

0.4.2 May 24, 2022
0.4.1 May 4, 2022
0.3.1 Jun 25, 2021
0.3.0 Sep 21, 2020
0.1.0 Sep 21, 2020

#519 in Rust patterns

Download history 249/week @ 2022-06-06 190/week @ 2022-06-13 391/week @ 2022-06-20 357/week @ 2022-06-27 280/week @ 2022-07-04 278/week @ 2022-07-11 223/week @ 2022-07-18 234/week @ 2022-07-25 223/week @ 2022-08-01 230/week @ 2022-08-08 223/week @ 2022-08-15 244/week @ 2022-08-22 141/week @ 2022-08-29 155/week @ 2022-09-05 75/week @ 2022-09-12 199/week @ 2022-09-19

576 downloads per month
Used in 4 crates (2 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

~0.6–1.2MB
~27K SLoC