Skip to content

Commit

Permalink
Derive additional useful traits for ResponseCode (#35)
Browse files Browse the repository at this point in the history
`ResponseCode` is no longer `String`-based, so we can use `Copy`. It might also make sense to provide a default value of `NoError` for cases where it might be the contents of an `Option`.
  • Loading branch information
leftmostcat authored and hellsworth committed Dec 2, 2024
1 parent c276a5a commit 35b308d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/types/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -253,9 +253,11 @@ pub enum ResponseClass {
/// any.
///
/// See <https://learn.microsoft.com/en-us/exchange/client-developer/web-service-reference/responsecode>
#[derive(Clone, Debug, Deserialize, PartialEq)]
#[derive(Clone, Copy, Debug, Default, Deserialize, PartialEq)]
pub enum ResponseCode {
#[default]
NoError,

ErrorAccessDenied,
ErrorAccessModeSpecified,
ErrorAccountDisabled,
Expand Down

0 comments on commit 35b308d

Please sign in to comment.