default_kwargs 0.1.0

The macro wich enables you to use default and keyword arguments in Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#![warn(clippy::all, clippy::pedantic, clippy::nursery, rustdoc::all)]

use default_kwargs::default_args;

#[derive(Debug, PartialEq)]
struct MyStruct(i32);

default_args! {
    fn thing(x: i32, MyStruct(y): MyStruct = MyStruct(69)) -> (i32, i32) {
        (x, y)
    }
}

fn main() {}