Squashed 'third_party/rules_rust/' content from commit bf59038ca

git-subtree-dir: third_party/rules_rust
git-subtree-split: bf59038cac11798cbaef9f3bf965bad8182b97fa
Signed-off-by: Brian Silverman <bsilver16384@gmail.com>
Change-Id: I5a20e403203d670df467ea97dde9a4ac40339a8d
diff --git a/util/label/label_error.rs b/util/label/label_error.rs
new file mode 100644
index 0000000..b1d7199
--- /dev/null
+++ b/util/label/label_error.rs
@@ -0,0 +1,20 @@
+#[derive(Debug, PartialEq)]
+pub struct LabelError(pub String);
+
+impl std::fmt::Display for LabelError {
+    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+        write!(f, "{}", self.0)
+    }
+}
+
+impl std::error::Error for LabelError {
+    fn description(&self) -> &str {
+        &self.0
+    }
+}
+
+impl From<String> for LabelError {
+    fn from(msg: String) -> Self {
+        Self(msg)
+    }
+}