From 55f5e8ca096467be2db895b459760ec34b63fce6 Mon Sep 17 00:00:00 2001 From: HampusM Date: Sat, 20 Aug 2022 18:06:42 +0200 Subject: docs: add example for displaying a unbound interface error --- examples/unbound/interfaces/cat.rs | 4 ++++ examples/unbound/interfaces/dog.rs | 4 ++++ examples/unbound/interfaces/human.rs | 4 ++++ examples/unbound/interfaces/mod.rs | 3 +++ 4 files changed, 15 insertions(+) create mode 100644 examples/unbound/interfaces/cat.rs create mode 100644 examples/unbound/interfaces/dog.rs create mode 100644 examples/unbound/interfaces/human.rs create mode 100644 examples/unbound/interfaces/mod.rs (limited to 'examples/unbound/interfaces') diff --git a/examples/unbound/interfaces/cat.rs b/examples/unbound/interfaces/cat.rs new file mode 100644 index 0000000..8650802 --- /dev/null +++ b/examples/unbound/interfaces/cat.rs @@ -0,0 +1,4 @@ +pub trait ICat +{ + fn meow(&self); +} diff --git a/examples/unbound/interfaces/dog.rs b/examples/unbound/interfaces/dog.rs new file mode 100644 index 0000000..4211c27 --- /dev/null +++ b/examples/unbound/interfaces/dog.rs @@ -0,0 +1,4 @@ +pub trait IDog +{ + fn woof(&self); +} diff --git a/examples/unbound/interfaces/human.rs b/examples/unbound/interfaces/human.rs new file mode 100644 index 0000000..dc20194 --- /dev/null +++ b/examples/unbound/interfaces/human.rs @@ -0,0 +1,4 @@ +pub trait IHuman +{ + fn make_pets_make_sounds(&self); +} diff --git a/examples/unbound/interfaces/mod.rs b/examples/unbound/interfaces/mod.rs new file mode 100644 index 0000000..5444978 --- /dev/null +++ b/examples/unbound/interfaces/mod.rs @@ -0,0 +1,3 @@ +pub mod cat; +pub mod dog; +pub mod human; -- cgit v1.2.3-18-g5258