I believe this does what you want:
trait Backend<'a> {
type Canvas: 'a;
fn canvas(&'a mut self) -> Self::Canvas;
}
I believe this does what you want:
trait Backend<'a> {
type Canvas: 'a;
fn canvas(&'a mut self) -> Self::Canvas;
}