svix_webhook_with_clone/models/
message_status.rs

1/*
2 * Svix API
3 *
4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5 *
6 * The version of the OpenAPI document: 1.1.1
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11#[allow(unused_imports)]
12use crate::models;
13#[allow(unused_imports)]
14use serde::{Deserialize, Serialize};
15        
16                use serde_repr::{Serialize_repr,Deserialize_repr};
17            /// MessageStatus : The sending status of the message: - Success = 0 - Pending = 1 - Fail = 2 - Sending = 3
18                /// The sending status of the message: - Success = 0 - Pending = 1 - Fail = 2 - Sending = 3
19                #[repr(i64)]
20                #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize_repr, Deserialize_repr)]
21                pub enum MessageStatus {
22                        Success = 0,
23                                            Pending = 1,
24                                            Fail = 2,
25                                            Sending = 3,
26                    
27                }
28
29                impl std::fmt::Display for MessageStatus {
30                fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
31                write!(f, "{}", match self {
32                        Self::Success => "0",
33                        Self::Pending => "1",
34                        Self::Fail => "2",
35                        Self::Sending => "3",
36                })
37                }
38                }
39            impl Default for MessageStatus {
40            fn default() -> MessageStatus {
41                Self::Success
42            }
43            }
44