auto_into 0.1.0

a rust macro that provides (slight) ergonomics for writing functions
Documentation

auto_into

this macro was born out of this internals.rust discusssion.

i've come around to thinking that this is an anti-pattern, i don't recommend you actually use this create. but developing it was cool and it works as a proof-of-concept if this discussion is ever brought up again.

Usage

here's the code example

use auto_into::auto_into;

#[auto_into]
fn takes_whatever(#[into] _: String) { }

fn main() {
	takes_whatever("lorem"); // &str
	takes_whatever(std::borrow::Cow::Borrowed("ipsum")); // moo
	takes_whatever(format!("{} sit", "dolor")); // String
	takes_whatever('a'); // char
}