using_return

Attribute Macro using_return 

Source
#[using_return]
Expand description

Apply on impl block, replace the default return type

ยงExamples

struct Foo;
#[using_param::using_return(i32)]
impl Foo {
    fn foo() { 2 }
    // like this:
    // fn foo() -> i32 { 2 }

    fn bar() -> () {}
    // like this:
    // fn bar() {}
}