pub enum CloudflareError {
ApiError {
code: i64,
message: String,
},
ApiErrors(Vec<String>),
HttpError {
status: u16,
body: String,
},
ParseError(Error),
RequestError(Error),
MissingRecordId,
NoResult,
}Expand description
Errors that can occur during Cloudflare API operations.
Variants§
ApiError
API returned an error response with specific error codes and messages.
Fields
ApiErrors(Vec<String>)
Multiple errors returned from Cloudflare API.
HttpError
HTTP request failed (network errors, timeouts, etc.).
ParseError(Error)
Failed to parse API response.
RequestError(Error)
Failed to send HTTP request.
MissingRecordId
Record has no ID when trying to update.
NoResult
No result returned from API.
Trait Implementations§
Source§impl Debug for CloudflareError
impl Debug for CloudflareError
Source§impl Display for CloudflareError
impl Display for CloudflareError
Source§impl Error for CloudflareError
impl Error for CloudflareError
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<Error> for CloudflareError
impl From<Error> for CloudflareError
Auto Trait Implementations§
impl Freeze for CloudflareError
impl !RefUnwindSafe for CloudflareError
impl Send for CloudflareError
impl Sync for CloudflareError
impl Unpin for CloudflareError
impl UnsafeUnpin for CloudflareError
impl !UnwindSafe for CloudflareError
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> 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.