portrait 0.3.1

Fills an `impl` with the associated items required by the trait.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#[portrait::make]
trait MyTrait {
    fn with_lifetime<'a>(&'a self);
}
struct A {}

impl MyTrait for A {
    fn with_lifetime<'a>(&'a self) {
        println!("do nothing");
    }
}

struct B {
    inner: A,
}

#[portrait::fill(portrait::delegate(A; self.inner))] // Without this, the panic will not be triggered.
impl MyTrait for B {}