impls_index

Crates.ioimpls_index
lib.rsimpls_index
version0.9.0
sourcesrc
created_at2022-05-15 21:57:14.558233
updated_at2024-10-30 21:03:15.824463
descriptionSeveral of macros to put each function under a named macro to index every function in a class.
homepagehttps://github.com/Wandalen/wTools/tree/master/module/core/impls_index
repositoryhttps://github.com/Wandalen/wTools/tree/master/module/core/impls_index
max_upload_size
id587357
size42,101
Wandalen (Wandalen)

documentation

https://docs.rs/impls_index

README

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
Commit count: 0

cargo fmt