paypal_rust/resources/enums/
verification_status.rs1use serde::{Deserialize, Serialize};
2
3#[derive(Copy, Clone, Debug, Deserialize, Serialize, PartialEq, Eq)]
4pub enum VerificationStatus {
5 #[serde(rename = "SUCCESS")]
6 Success,
7 #[serde(rename = "FAILURE")]
8 Failure,
9}
10
11impl VerificationStatus {
12 pub const fn as_str(self) -> &'static str {
13 match self {
14 Self::Success => "SUCCESS",
15 Self::Failure => "FAILURE",
16 }
17 }
18}
19
20impl AsRef<str> for VerificationStatus {
21 fn as_ref(&self) -> &str {
22 self.as_str()
23 }
24}
25
26impl std::fmt::Display for VerificationStatus {
27 fn fmt(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
28 self.as_str().fmt(formatter)
29 }
30}