diff options
author | Matthias Beyer <matthias.beyer@ifm.com> | 2022-06-23 12:36:11 +0200 |
---|---|---|
committer | Matthias Beyer <matthias.beyer@ifm.com> | 2022-06-23 16:42:57 +0200 |
commit | 10ef8e00bd7c78ed709c933edd92a59cc885e341 (patch) | |
tree | ce23d7f8b8a64aa1be8f42219892d5adafbb71b6 /crates/core/tedge_api/examples | |
parent | 2d1b5a5353910dce8e785e2ffe3d2786d0917b2b (diff) |
Change TypeUuid implementation to bevy_reflect
This patch replaces the type_uuid crate with the bevy_reflect
implementation of the functionality.
The rationale for this is, that the implementation of the type_uuid
crate does not support generics, but the bevy_reflect implementation
does.
As we need generic support for type uuids, we change to bevy_reflect
here.
Suggested-by: Marcel Müller <m.mueller@ifm.com>
Signed-off-by: Matthias Beyer <matthias.beyer@ifm.com>
Diffstat (limited to 'crates/core/tedge_api/examples')
-rw-r--r-- | crates/core/tedge_api/examples/heartbeat.rs | 2 | ||||
-rw-r--r-- | crates/core/tedge_api/examples/universal_log.rs | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/crates/core/tedge_api/examples/heartbeat.rs b/crates/core/tedge_api/examples/heartbeat.rs index 8d64232a..41dc7e74 100644 --- a/crates/core/tedge_api/examples/heartbeat.rs +++ b/crates/core/tedge_api/examples/heartbeat.rs @@ -1,6 +1,7 @@ use std::{collections::HashMap, sync::Arc, time::Duration}; use async_trait::async_trait; +use bevy_reflect::TypeUuid; use futures::FutureExt; use tedge_api::{ address::ReplySenderFor, @@ -10,7 +11,6 @@ use tedge_api::{ PluginError, }; use tokio::sync::RwLock; -use type_uuid::TypeUuid; #[derive(Debug, TypeUuid)] #[uuid = "94916be9-17ba-4bca-a3a0-408d33136fed"] diff --git a/crates/core/tedge_api/examples/universal_log.rs b/crates/core/tedge_api/examples/universal_log.rs index 064ffa22..0a1c6793 100644 --- a/crates/core/tedge_api/examples/universal_log.rs +++ b/crates/core/tedge_api/examples/universal_log.rs @@ -1,6 +1,7 @@ use std::{collections::HashMap, sync::Arc, time::Duration}; use async_trait::async_trait; +use bevy_reflect::TypeUuid; use futures::FutureExt; use tedge_api::{ address::ReplySenderFor, @@ -10,16 +11,15 @@ use tedge_api::{ PluginError, }; use tokio::sync::RwLock; -use type_uuid::TypeUuid; /// A message that represents a heartbeat that gets sent to plugins #[derive(Debug, TypeUuid)] -#[uuid = "1f807f7b-888f-4881-a1b5-16380e32f8c2"] +#[uuid = "1f807f7b-888f-4881-a1b5-16380e32f8c2"] struct Heartbeat; impl Message for Heartbeat {} #[derive(Debug, TypeUuid)] -#[uuid = "346e233f-c24a-47e0-a15b-3ec0d1e19019"] +#[uuid = "346e233f-c24a-47e0-a15b-3ec0d1e19019"] struct RandomData; impl Message for RandomData {} |