#wtools #impl #general-purpose #impls-index

impls_index

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

13 releases (breaking)

new 0.10.0 Apr 16, 2025
0.9.0 Oct 30, 2024
0.8.0 Sep 14, 2024
0.7.0 May 11, 2024
0.1.3 Jul 2, 2022

#2774 in Algorithms

Download history 120/week @ 2024-12-27 76/week @ 2025-01-03 86/week @ 2025-01-10 172/week @ 2025-01-17 82/week @ 2025-01-24 88/week @ 2025-01-31 87/week @ 2025-02-07 274/week @ 2025-02-14 247/week @ 2025-02-21 228/week @ 2025-02-28 429/week @ 2025-03-07 313/week @ 2025-03-14 76/week @ 2025-03-21 153/week @ 2025-03-28 487/week @ 2025-04-04 155/week @ 2025-04-11

905 downloads per month
Used in 76 crates (6 directly)

MIT license

20KB
631 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

~200–630KB
~15K SLoC