Skip to content

Instantly share code, notes, and snippets.

@rust-play
Created January 17, 2021 16:45
Show Gist options
  • Save rust-play/e10ba5a143f7c30018230953ac26e149 to your computer and use it in GitHub Desktop.
Save rust-play/e10ba5a143f7c30018230953ac26e149 to your computer and use it in GitHub Desktop.
Code shared from the Rust Playground
trait ReportCore {
fn different_for_each_type(..);
}
trait Report : ReportCore {
fn same_for_many_types(..);
}
trait StatReport : ReportCore {
fn another_method(..);
}
impl<T: StatReport> Report for T {
pub fn same_for_many_types(..) { .. }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment