#[non_exhaustive]
pub enum ImdsError {
FailedToLoadToken(SdkError<TokenError>),
InvalidPath,
ErrorResponse {
response: Response<SdkBody>,
},
IoError(Box<dyn Error + Send + Sync + 'static>),
Unexpected(Box<dyn Error + Send + Sync + 'static>),
}
Expand description
An error retrieving metadata from IMDS
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
FailedToLoadToken(SdkError<TokenError>)
An IMDSv2 Token could not be loaded
Requests to IMDS must be accompanied by a token obtained via a PUT
request. This is handled
transparently by the Client
.
InvalidPath
The path
was invalid for an IMDS request
The path
parameter must be a valid URI path segment, and it must begin with /
.
ErrorResponse
Fields
This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
An error response was returned from IMDS
IoError(Box<dyn Error + Send + Sync + 'static>)
IO Error
An error occurred communication with IMDS
Unexpected(Box<dyn Error + Send + Sync + 'static>)
An unexpected error occurred communicating with IMDS
Trait Implementations
sourceimpl Error for ImdsError
impl Error for ImdsError
sourcefn 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 · sourcefn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Auto Trait Implementations
impl !RefUnwindSafe for ImdsError
impl Send for ImdsError
impl Sync for ImdsError
impl Unpin for ImdsError
impl !UnwindSafe for ImdsError
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more