pub enum IntelApiError {
UnsupportedApiVersion(String),
Reqwest(Error),
UrlParse(ParseError),
JsonError(Error),
ApiError {
status: StatusCode,
request_id: String,
error_code: Option<String>,
error_message: Option<String>,
},
MissingOrInvalidHeader(&'static str),
InvalidSubscriptionKey,
ConflictingParameters(&'static str),
Io(Error),
HeaderValueParse(&'static str, String),
InvalidParameter(&'static str),
}
Expand description
Represents all possible errors that can occur when interacting with Intel’s DCAP API.
Variants§
UnsupportedApiVersion(String)
Indicates that the requested API version or feature is unsupported.
Reqwest(Error)
Wraps an underlying reqwest error.
UrlParse(ParseError)
Wraps a URL parsing error.
JsonError(Error)
Wraps a Serde JSON error.
ApiError
Represents a general API error, capturing the HTTP status and optional error details.
Fields
§
status: StatusCode
HTTP status code returned by the API.
MissingOrInvalidHeader(&'static str)
Indicates that a header is missing or invalid.
InvalidSubscriptionKey
Represents an invalid subscription key.
ConflictingParameters(&'static str)
Indicates that conflicting parameters were supplied.
Io(Error)
Wraps a standard I/O error.
HeaderValueParse(&'static str, String)
Represents an error while parsing a header’s value.
InvalidParameter(&'static str)
Indicates an invalid parameter was provided.
Trait Implementations§
Source§impl Debug for IntelApiError
impl Debug for IntelApiError
Source§impl Display for IntelApiError
impl Display for IntelApiError
Source§impl Error for IntelApiError
impl Error for IntelApiError
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 IntelApiError
impl From<Error> for IntelApiError
Source§impl From<Error> for IntelApiError
impl From<Error> for IntelApiError
Source§impl From<Error> for IntelApiError
impl From<Error> for IntelApiError
Source§impl From<ParseError> for IntelApiError
impl From<ParseError> for IntelApiError
Source§fn from(source: ParseError) -> Self
fn from(source: ParseError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for IntelApiError
impl !RefUnwindSafe for IntelApiError
impl Send for IntelApiError
impl Sync for IntelApiError
impl Unpin for IntelApiError
impl !UnwindSafe for IntelApiError
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.