diff options
-rw-r--r-- | crates/core/tedge_api/src/message.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/crates/core/tedge_api/src/message.rs b/crates/core/tedge_api/src/message.rs index bbcda857..f7beb94c 100644 --- a/crates/core/tedge_api/src/message.rs +++ b/crates/core/tedge_api/src/message.rs @@ -141,6 +141,15 @@ impl MessageType { pub fn name(&self) -> &'static str { self.name } + + /// Check whether the UUID of this MessageType is the same as of the other MessageType + #[must_use] + pub fn eq_uuid(&self, other: &Self) -> bool { + match (&self.kind, &other.kind) { + (MessageKind::Typed(uuid_a), MessageKind::Typed(uuid_b)) => uuid_a == uuid_b, + _ => false, + } + } } /// A message to tell the core to stop thin-edge |