Enum paystack::PaystackError
source · pub enum PaystackError {
Generic(String),
Transaction(String),
Charge(String),
RequestNotSuccessful(RequestNotSuccessful),
ResponseParsing(String),
Reqwest(Error),
}
Expand description
Custom Error for the Paystack API
Variants§
Generic(String)
Generic error, not used frequently
Transaction(String)
Error associated with Transaction operation
Charge(String)
Error associated with Charge
RequestNotSuccessful(RequestNotSuccessful)
Error for unsuccessful request to the Paystack API
ResponseParsing(String)
Error associated with failed parsing of response from the Paystack API
Reqwest(Error)
Default HTTP error from the Reqwest crate
Trait Implementations§
source§impl Debug for PaystackError
impl Debug for PaystackError
source§impl Display for PaystackError
impl Display for PaystackError
source§impl Error for PaystackError
impl Error for PaystackError
source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
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()
source§impl From<Error> for PaystackError
impl From<Error> for PaystackError
source§impl From<RequestNotSuccessful> for PaystackError
impl From<RequestNotSuccessful> for PaystackError
source§fn from(source: RequestNotSuccessful) -> Self
fn from(source: RequestNotSuccessful) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for PaystackError
impl Send for PaystackError
impl Sync for PaystackError
impl Unpin for PaystackError
impl !UnwindSafe for PaystackError
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