#macro #fundamental #general-purpose #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

10 releases (6 breaking)

0.7.0 May 11, 2024
0.6.0 Mar 16, 2024
0.5.0 Mar 16, 2024
0.2.0 Oct 19, 2023
0.1.3 Jul 2, 2022

#1242 in Development tools

Download history 192/week @ 2024-01-28 222/week @ 2024-02-04 349/week @ 2024-02-11 414/week @ 2024-02-18 546/week @ 2024-02-25 551/week @ 2024-03-03 2982/week @ 2024-03-10 3728/week @ 2024-03-17 633/week @ 2024-03-24 891/week @ 2024-03-31 461/week @ 2024-04-07 458/week @ 2024-04-14 731/week @ 2024-04-21 599/week @ 2024-04-28 885/week @ 2024-05-05 1366/week @ 2024-05-12

3,590 downloads per month
Used in 84 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–1MB
~21K SLoC