auto_into 0.1.0

a rust macro that provides (slight) ergonomics for writing functions
Documentation
  • Coverage
  • 0%
    0 out of 2 items documented0 out of 1 items with examples
  • Size
  • Source code size: 7.53 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 278.58 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 5s Average build duration of successful builds.
  • all releases: 5s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Repository
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • jvcmarcenes

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
}