Overload functions (overfn)

This crate allows you to overload functions with the same name but with different number of arguments through the overload macro. After overloading all the functions, you need to use the macros!() to genarate the macros to invoke the overloaded functions.

Example

```rust use overfn::*;

[overload]

fn test(item: usize) -> usize { item }

[overload]

fn test(left: usize, right: usize) -> usize { left + right }

struct Test(usize);

impl Test { #[overload(Test)] fn new() -> Self { Self(0) }

#[overload(Test)]
fn new(item: usize) -> Self {
    Self(item)
}

#[overload(Test)]
fn test(&self) -> usize {
    self.0
}

#[overload(Test)]
fn test(&self, other: usize) -> usize {
    self.0 + other
}

}

macros!();

asserteq!(test!(2), 2); asserteq!(test!(2, 2), 4);

let test = Testnew!(); asserteq!(test.0, 0);

let test = Testnew!(2); asserteq!(test.0, 2);

asserteq!(Testtest!(test), 2); asserteq!(Testtest!(test, 2), 4); ```

Documentation

You can find the documentation here.

Limitations

License

This project is licensed under the MIT license or Apache License, Version 2.0 at your option.