using_generic

Attribute Macro using_generic 

Source
#[using_generic]
Expand description

Apply on impl block, add to generics parameter

ยงExamples

struct Foo;
#[using_param::using_generic(T)]
impl Foo {
    fn foo<U>(&self, t: T, u: U) {}
    // like this:
    // fn foo<T, U>(&self, t: T, u: U) {}
}
#[using_param::using_generic(, T)]
impl Foo {
    fn bar<U>(&self, u: U, t: T) {}
    // like this:
    // fn bar<U, T>(&self, u: U, t: T) {}
}