Is it possible to change this code to specify just the main type: impl Writer<MyTable>
and let Rust deduce the H
and R
parameters automatically?
trait Table<H, R> {
fn rows(&self) -> &Vec<R>;
fn header(&self) -> &H;
}
// MyTable implements Table
trait Writer<H, R, T: Table<H, R>> {}
impl Writer<MyTableHeader, MyTableRow, MyTable> for WriterImpl {}