Expand description
Procedural macro compile-time assertions as an extension of
static_assertions.
§Usage
There’s two main ways of using this crate: as a direct dependency or
indirect dependency (via static_assertions).
§Direct Dependency
This crate is available on crates.io and can be used by adding the
following to your project’s Cargo.toml:
[dependencies]
proc_static_assertions = "0.0.0"and this to your crate root (main.rs or lib.rs):
#[macro_use]
extern crate proc_static_assertions;§Indirect Dependency
Add the following to your project’s Cargo.toml:
[dependencies]
static_assertions = { version = "1.1.0", features = ["proc"] }and this to your crate root (main.rs or lib.rs):
ⓘ
#[macro_use]
extern crate static_assertions;This will also import all macros in proc_static_assertions.
§Donate
This project is made freely available (as in free beer), but unfortunately not all beer is free! So, if you would like to buy me a beer (or coffee or more), then consider supporting my work that’s benefited your project and thousands of others.
Attribute Macros§
- assert
- Statically assert aspects of types, traits, and more.
