You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: error.rs
    path of file: ./repos/aws-sdk-rust/sdk/aws-config/src/imds/client
    
    the code of the file until where you have to start completion: /*
 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * SPDX-License-Identifier: Apache-2.0
 */

//! Error types for [`ImdsClient`](crate::imds::client::Client)

use aws_smithy_runtime_api::client::orchestrator::HttpResponse;
use aws_smithy_runtime_api::client::result::SdkError;
use std::error::Error;
use std::fmt;

/// Error context for [`ImdsError::FailedToLoadToken`]
#[derive(Debug)]
pub struct FailedToLoadToken {
    source: SdkError<TokenError, HttpResponse>,
}

impl FailedToLoadToken {
    /// Returns `true` if a dispatch failure ca
    
    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
        match self {
            ImdsError::FailedToLoadToken(_) => {
                write!(f, "failed to load IMDS session token")
            }
            ImdsError::ErrorResponse(context) => write!(
                f,
                "error response from IMDS (code: {}). {:?}",
                context.raw.status().as_u16(),
                context.raw
            ),
            ImdsError::IoError(_) => {
                write!(f, "an IO error occurred communicating with IMDS")
            }
            ImdsError::Unexpected(_) => {
                write!(f, "an unexpected error occurred communicating with IMDS",)
            }
        }
    }