From c3c39ddf59e99a309300583b68242d59c2c65702 Mon Sep 17 00:00:00 2001 From: Zachary Sunforge Date: Tue, 25 Jun 2024 12:48:57 -0700 Subject: [PATCH] Added InvalidMessage error type --- Cargo.toml | 2 +- src/error.rs | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 2391b7f..539eb74 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,7 +9,7 @@ members = [ ] [workspace.package] -version = "0.3.1" +version = "0.3.2" edition = "2021" repository = "https://git.bfpower.io/BFPOWER/physical" readme = "README.md" diff --git a/src/error.rs b/src/error.rs index d371350..fc76b1d 100644 --- a/src/error.rs +++ b/src/error.rs @@ -1,7 +1,10 @@ -/// Indicates the transducer value is statically known to be impossible. +/// Indicates the transducer value is known to be impossible. #[derive(Copy, Clone, Debug, Eq, PartialEq)] pub struct InvalidValue; +/// Indicates that the received message is malformed. +#[derive(Copy, Clone, Debug, Eq, PartialEq)] +pub struct InvalidMessage; /// An error that it is likely impossible to recover from. This error should only be created in /// situations where attempts to recover have already been attempted and have failed. Error handling /// should consist of attempting to alert another system for maintenance and attempting to shut down