Home

Awesome

Banner

<div align="center"> <a href="https://crates.io/crates/static_assertions"> <img src="https://img.shields.io/crates/v/static_assertions.svg" alt="Crates.io"> <img src="https://img.shields.io/crates/d/static_assertions.svg" alt="Downloads"> </a> <a href="https://github.com/nvzqz/static-assertions-rs/actions?query=workflow%3ACI"> <img src="https://github.com/nvzqz/static-assertions-rs/workflows/CI/badge.svg" alt="Build Status"> </a> <img src="https://img.shields.io/badge/rustc-^1.37.0-blue.svg" alt="rustc ^1.37.0"> <br> <a href="https://www.patreon.com/nvzqz"> <img src="https://c5.patreon.com/external/logo/become_a_patron_button.png" alt="Become a Patron!" height="35"> </a> <a href="https://www.paypal.me/nvzqz"> <img src="https://buymecoffee.intm.org/img/button-paypal-white.png" alt="Buy me a coffee" height="35"> </a> </div>

Compile-time assertions for Rust, brought to you by Nikolai Vazquez.

This library lets you ensure correct assumptions about constants, types, and more. See the docs and FAQ for more info!

Installation

This crate is available on crates.io and can be used by adding the following to your project's Cargo.toml:

[dependencies]
static_assertions = "1.1.0"

and this to your crate root (main.rs or lib.rs):

#[macro_use]
extern crate static_assertions;

Usage

This crate exposes the following macros:

FAQ

Changes

See CHANGELOG.md for a complete list of what has changed from one version to another.

License

This project is released under either:

at your choosing.