Struct paystack::RequestNotSuccessful
source · pub struct RequestNotSuccessful {
pub status: StatusCode,
pub body: String,
}
Expand description
Wrapper type which contains a failed request’s status code and body
Fields§
§status: StatusCode
Status code returned by the HTTP call to Paystack API
body: String
Body returned by the HTTP call to the Paystack API
Implementations§
source§impl RequestNotSuccessful
impl RequestNotSuccessful
sourcepub fn new(status: StatusCode, body: String) -> Self
pub fn new(status: StatusCode, body: String) -> Self
Create a new unsucessful request error.
Trait Implementations§
source§impl Debug for RequestNotSuccessful
impl Debug for RequestNotSuccessful
source§impl Display for RequestNotSuccessful
impl Display for RequestNotSuccessful
source§impl Error for RequestNotSuccessful
impl Error for RequestNotSuccessful
1.30.0 · 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<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 RequestNotSuccessful
impl Send for RequestNotSuccessful
impl Sync for RequestNotSuccessful
impl Unpin for RequestNotSuccessful
impl UnwindSafe for RequestNotSuccessful
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