aboutsummaryrefslogtreecommitdiff
path: root/examples/generics/interfaces/printer.rs
diff options
context:
space:
mode:
Diffstat (limited to 'examples/generics/interfaces/printer.rs')
-rw-r--r--examples/generics/interfaces/printer.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/examples/generics/interfaces/printer.rs b/examples/generics/interfaces/printer.rs
new file mode 100644
index 0000000..3098d0b
--- /dev/null
+++ b/examples/generics/interfaces/printer.rs
@@ -0,0 +1,6 @@
+use std::fmt::Display;
+
+pub trait IPrinter<Printable: Display>
+{
+ fn print(&self, out: Printable);
+}