From d814091e7367d101197c35e2f7e56a744ce4296b Mon Sep 17 00:00:00 2001 From: Franklin Date: Mon, 28 Nov 2022 21:14:49 -0400 Subject: [PATCH] added impls --- src/lib.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index f3d8579..907e7ef 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -6,7 +6,7 @@ use serde::{Serialize, Deserialize}; /// case you want to deal with internationalization. /// It was left as optional just in case you don't /// have the time to yet... -#[derive(Serialize, Deserialize, Debug, Clone)] +#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, PartialOrd, Ord)] pub struct MessageResource { pub key: Option, pub message: String, @@ -39,7 +39,6 @@ impl Default for MessageResource{ Self { key: None, message: "".to_string() } } } - /// This is supposed to be used whenever you have an error in your code and want to be more specific about it. /// Fits in with most CRUD web apps. What you send back to the client is a MessageResource, not the error itself! #[derive(Debug, Clone)]