fn_overloads
A simple proc macro that utilizes the nightly features fn_traits and unboxed_closures to mimic function overloads.
This allows you to have varying function arguments and return types for the same function.
Please do not use this.
Example usage
use fn_overloads;
fn_overloads!
Generics
This macro supports generics with some limitations, all generics must be used in function arguments.
use ;
fn_overloads!
Async
This macro supports async, but by default requires either alloc or std. The std feature flag is turned on by default.
By default, the macro will desugar an async function to Pin<Box<dyn Future<Output = T> + Send>>.
To remove the Send trait bound, add !Send after the async.
With the impl_futures flag turned on the macro will desugar an async function to impl Future<Output = T> + Send which requires the impl_trait_in_assoc_type nightly feature, but this removes the requirement for std or alloc.
use ;
use ;
fn_overloads!