diff options
Diffstat (limited to 'examples/async/interfaces')
-rw-r--r-- | examples/async/interfaces/cat.rs | 4 | ||||
-rw-r--r-- | examples/async/interfaces/dog.rs | 4 | ||||
-rw-r--r-- | examples/async/interfaces/human.rs | 4 | ||||
-rw-r--r-- | examples/async/interfaces/mod.rs | 3 |
4 files changed, 15 insertions, 0 deletions
diff --git a/examples/async/interfaces/cat.rs b/examples/async/interfaces/cat.rs new file mode 100644 index 0000000..478f7e0 --- /dev/null +++ b/examples/async/interfaces/cat.rs @@ -0,0 +1,4 @@ +pub trait ICat: Send + Sync +{ + fn meow(&self); +} diff --git a/examples/async/interfaces/dog.rs b/examples/async/interfaces/dog.rs new file mode 100644 index 0000000..a6ed111 --- /dev/null +++ b/examples/async/interfaces/dog.rs @@ -0,0 +1,4 @@ +pub trait IDog: Send + Sync +{ + fn woof(&self); +} diff --git a/examples/async/interfaces/human.rs b/examples/async/interfaces/human.rs new file mode 100644 index 0000000..18f9d63 --- /dev/null +++ b/examples/async/interfaces/human.rs @@ -0,0 +1,4 @@ +pub trait IHuman: Send + Sync +{ + fn make_pets_make_sounds(&self); +} diff --git a/examples/async/interfaces/mod.rs b/examples/async/interfaces/mod.rs new file mode 100644 index 0000000..5444978 --- /dev/null +++ b/examples/async/interfaces/mod.rs @@ -0,0 +1,3 @@ +pub mod cat; +pub mod dog; +pub mod human; |