#macro #general-purpose #fundamental #index #class #component #comprehension

no-std impls_index

Several of macros to put each function under a named macro to index every function in a class

9 releases (5 breaking)

0.6.0 Mar 16, 2024
0.5.0 Mar 16, 2024
0.4.0 Mar 16, 2024
0.3.0 Mar 1, 2024
0.1.1 May 25, 2022

#1597 in Development tools

Download history 499/week @ 2023-12-07 302/week @ 2023-12-14 262/week @ 2023-12-21 141/week @ 2023-12-28 243/week @ 2024-01-04 288/week @ 2024-01-11 213/week @ 2024-01-18 194/week @ 2024-01-25 180/week @ 2024-02-01 262/week @ 2024-02-08 447/week @ 2024-02-15 453/week @ 2024-02-22 538/week @ 2024-02-29 1406/week @ 2024-03-07 3945/week @ 2024-03-14 2098/week @ 2024-03-21

8,052 downloads per month
Used in 83 crates (6 directly)

MIT license

20KB
625 lines

Module :: impls_index

experimental rust-status docs.rs Open in Gitpod discord

Several of macros to put each function under a named macro to index every function in a class.

It encourages writing better code, having index of components stripped of details of implementation is very important for comprehension of the code and ability to see the big picture.

Basic use-case

use ::impls_index::*;

impls1!
{
  fn f1() -> i32
  {
    println!( "f1() : 13" );
    13
  }
};

index!
{
  f1,
}

assert_eq!( f1(), 13 );
/* print : f1() : 13 */

To add to your project

cargo add impls_index_meta

Try out from the repository

git clone https://github.com/Wandalen/wTools
cd wTools
cd examples/impls_index_trivial
cargo run

Dependencies

~0.4–0.9MB
~21K SLoC