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

no-std impls_index

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

12 releases (breaking)

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

#344 in Algorithms

Download history 442/week @ 2024-08-17 827/week @ 2024-08-24 544/week @ 2024-08-31 482/week @ 2024-09-07 475/week @ 2024-09-14 303/week @ 2024-09-21 342/week @ 2024-09-28 179/week @ 2024-10-05 374/week @ 2024-10-12 188/week @ 2024-10-19 520/week @ 2024-10-26 983/week @ 2024-11-02 358/week @ 2024-11-09 492/week @ 2024-11-16 195/week @ 2024-11-23 811/week @ 2024-11-30

2,122 downloads per month
Used in 79 crates (6 directly)

MIT license

21KB
640 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

~2MB
~39K SLoC