Function_Group
Function Group is a Function Overloading macro/hack for the rust programing language. The macro allows you to define multiple functions that take a variable number of arguments! Actually the functions still only take one argument, but they accept multiple types of tuples
Function groups can take multiple types of arguments and even be recursive
function_group!
assert!;
assert!;
The arguments can be mutable or immutable refrences.
function_group!
let mut x = 10;
add_to;
add_to;
assert!;
Function Groups can even be associated with a Type. In the example below, each sub function will be passed a mutable refrence to self, and these functions will be usable by the TestStruct type.
;
function_group!
let mut x = TestStruct;
x.add_to_struct;
assert!;
Possible future features
- Generics should be feasble on a per sub-function basis
- having a function group in a trait is unlikely