pub enum DataForSeoError {
Api(DataForSeoApiError),
Http(DataForSeoHttpError),
System(DataForSeoSystemError),
}Expand description
Any error produced by a DataForSEO API call.
Variants§
Api(DataForSeoApiError)
The API answered with an error envelope (HTTP 4xx/5xx and a
DataForSEO status_code / status_message).
Http(DataForSeoHttpError)
The server answered with a non-JSON HTTP failure.
System(DataForSeoSystemError)
Transport or (de)serialization failure.
Implementations§
Source§impl DataForSeoError
impl DataForSeoError
Sourcepub fn http_status(&self) -> u16
pub fn http_status(&self) -> u16
HTTP status of the failed call, or 0 for transport-level failures.
Sourcepub fn api_status_code(&self) -> Option<i32>
pub fn api_status_code(&self) -> Option<i32>
DataForSEO status code (e.g. 40101) when the API returned one.
See https://docs.dataforseo.com/v3/appendix/errors/.
Trait Implementations§
Source§impl Clone for DataForSeoError
impl Clone for DataForSeoError
Source§impl Debug for DataForSeoError
impl Debug for DataForSeoError
Source§impl Display for DataForSeoError
impl Display for DataForSeoError
Source§impl Error for DataForSeoError
impl Error for DataForSeoError
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()
Source§impl From<DataForSeoApiError> for DataForSeoError
impl From<DataForSeoApiError> for DataForSeoError
Source§fn from(value: DataForSeoApiError) -> Self
fn from(value: DataForSeoApiError) -> Self
Converts to this type from the input type.
Source§impl From<DataForSeoHttpError> for DataForSeoError
impl From<DataForSeoHttpError> for DataForSeoError
Source§fn from(value: DataForSeoHttpError) -> Self
fn from(value: DataForSeoHttpError) -> Self
Converts to this type from the input type.
Source§impl From<DataForSeoSystemError> for DataForSeoError
impl From<DataForSeoSystemError> for DataForSeoError
Source§fn from(value: DataForSeoSystemError) -> Self
fn from(value: DataForSeoSystemError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for DataForSeoError
impl RefUnwindSafe for DataForSeoError
impl Send for DataForSeoError
impl Sync for DataForSeoError
impl Unpin for DataForSeoError
impl UnsafeUnpin for DataForSeoError
impl UnwindSafe for DataForSeoError
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