mirror of
https://github.com/openharmony/third_party_rust_static-assertions-rs.git
synced 2026-07-19 16:53:36 -04:00
91a97cd319a09867ce66bb3f5e69a44e3c00a7e5
Rust compile-time assertions to ensure that invariants are met.
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 = "0.3.2"
and this to your crate root (main.rs or lib.rs):
#[macro_use]
extern crate static_assertions;
Usage
This crate exposes the following macros:
assert_cfg!assert_eq_size!assert_eq_size_ptr!assert_eq_size_val!assert_eq_type!assert_ne_type!assert_fields!assert_impl!assert_obj_safe!const_assert!const_assert_eq!
Limitations
See issue #1 to read up on current limitations of this crate and how to currently overcome them.
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.
Description
Languages
Rust
100%
