diff options
author | HampusM <hampus@hampusmat.com> | 2022-08-29 20:52:56 +0200 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2022-08-29 21:01:32 +0200 |
commit | 080cc42bb1da09059dbc35049a7ded0649961e0c (patch) | |
tree | 307ee564124373616022c1ba2b4d5af80845cd92 /examples/async/interfaces | |
parent | 6e31d8f9e46fece348f329763b39b9c6f2741c07 (diff) |
feat: implement async functionality
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; |