Crate diagnostics

Source
Expand description

Diagnostics tools.

§Module :: diagnostics_tools

experimental rust-status docs.rs Open in Gitpod discord

Diagnostics tools.

§Sample

#[ test ]
#[ should_panic ]
fn a_id_panic_test()
{
  a_id!( 1, 2 );
  /*
    print :
    ...

thread 'a_id_panic_test' panicked at 'assertion failed: `(left == right)`

Diff < left / right > :
<1
>2
...
  */
}

§To add to your project

§Try out from the repository

git clone https://github.com/Wandalen/wTools
cd wTools
cd sample/rust/diagnostics_tools_trivial
cargo run

Modules§

dependencies
Dependencies.
diagnostics
Compile-time asserting.
exposed
Exposed namespace of the module.
layout
Compile-time asserting of memory layout.
orphan
Orphan namespace of the module.
prelude
Prelude to use essentials: use my_module::prelude::*.
protected
Protected namespace of the module.

Macros§

a_dbg_id
Asserts that two expressions are identical to each other.
a_dbg_not_id
Asserts that two expressions are not identical to each other.
a_dbg_true
Asserts that a boolean expression is true at runtime.
a_id
Asserts that two expressions are equal to each other (using PartialEq).
a_not_id
Asserts that two expressions are not equal to each other (using PartialEq).
a_true
Asserts that a boolean expression is true at runtime.
cta_mem_same_size
Compile-time assertion that two values have the same size.
cta_ptr_same_size
Compile-time assertion that memory behind two references have the same size.
cta_true
Macro to compare meta condition is true at compile-time.
cta_type_same_align
Compile-time assertion of having the same align.
cta_type_same_size
Compile-time assertion that two types have the same size.