pub enum SmsStatusCode {
Ok,
InvalidParameter,
InvalidPhoneNumber,
LimitExceeded,
InsufficientBalance,
Other(String),
}Expand description
短信发送状态码
表示单个手机号的短信发送结果状态
Variants§
Ok
发送成功
InvalidParameter
参数错误
InvalidPhoneNumber
手机号格式错误
LimitExceeded
频率限制
InsufficientBalance
余额不足
Other(String)
其他错误(包含原始错误码)
Implementations§
Source§impl SmsStatusCode
impl SmsStatusCode
Sourcepub fn is_success(&self) -> bool
pub fn is_success(&self) -> bool
判断是否为成功状态
Sourcepub fn to_string_owned(&self) -> String
pub fn to_string_owned(&self) -> String
转换为 String(用于需要 String 类型的场景)
Trait Implementations§
Source§impl Clone for SmsStatusCode
impl Clone for SmsStatusCode
Source§fn clone(&self) -> SmsStatusCode
fn clone(&self) -> SmsStatusCode
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SmsStatusCode
impl Debug for SmsStatusCode
Source§impl<'de> Deserialize<'de> for SmsStatusCode
impl<'de> Deserialize<'de> for SmsStatusCode
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for SmsStatusCode
impl Display for SmsStatusCode
Source§impl From<String> for SmsStatusCode
impl From<String> for SmsStatusCode
Source§impl PartialEq for SmsStatusCode
impl PartialEq for SmsStatusCode
impl Eq for SmsStatusCode
impl StructuralPartialEq for SmsStatusCode
Auto Trait Implementations§
impl Freeze for SmsStatusCode
impl RefUnwindSafe for SmsStatusCode
impl Send for SmsStatusCode
impl Sync for SmsStatusCode
impl Unpin for SmsStatusCode
impl UnwindSafe for SmsStatusCode
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.
Source§impl<T> ValidateIp for Twhere
T: ToString,
impl<T> ValidateIp for Twhere
T: ToString,
Source§fn validate_ipv4(&self) -> bool
fn validate_ipv4(&self) -> bool
Validates whether the given string is an IP V4
Source§fn validate_ipv6(&self) -> bool
fn validate_ipv6(&self) -> bool
Validates whether the given string is an IP V6
Source§fn validate_ip(&self) -> bool
fn validate_ip(&self) -> bool
Validates whether the given string is an IP