pub enum SmsError {
Http(String),
Auth(String),
Invalid(String),
Provider(String),
Unexpected(String),
}Expand description
Errors that can occur during SMS send operations.
Each variant maps to a distinct failure class so callers can decide whether to retry, re-authenticate, fix their input, or escalate.
Variants§
Http(String)
An HTTP / network-level transport error (timeouts, DNS failures, etc.).
Auth(String)
The provider rejected the caller’s credentials.
Invalid(String)
The request itself was malformed (bad phone number, empty text, etc.).
Provider(String)
The provider returned a business-logic error (insufficient balance, blocked destination, etc.).
Unexpected(String)
Catch-all for errors that don’t fit the categories above.
Trait Implementations§
Source§impl Error for SmsError
impl Error for SmsError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for SmsError
impl RefUnwindSafe for SmsError
impl Send for SmsError
impl Sync for SmsError
impl Unpin for SmsError
impl UnsafeUnpin for SmsError
impl UnwindSafe for SmsError
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