pub trait ApiResponse {
// Required method
fn to_struct(
&mut self,
http_response: Response,
) -> impl Future<Output = Result<(), Error>>;
}Expand description
Trait to handle API responses
This trait defines the method to convert an HTTP response into a struct.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementations on Foreign Types§
Source§impl ApiResponse for DescribeImagesResp
Implement the ApiResponse trait for DescribeImagesResp struct.
impl ApiResponse for DescribeImagesResp
Implement the ApiResponse trait for DescribeImagesResp struct.
This implementation provides a method to process the HTTP response from an API call
and convert it into the corresponding DescribeImagesResp struct. The response
typically contains a list of ECS images, and this struct will hold that information.
§Methods
to_struct: Parses the HTTP response (JSON) and deserializes it into theDescribeImagesRespstruct.
Source§async fn to_struct(&mut self, http_response: Response) -> Result<(), Error>
async fn to_struct(&mut self, http_response: Response) -> Result<(), Error>
Converts the HTTP response into the DescribeImagesResp struct.
This method processes the HTTP response (which is expected to be in JSON format),
deserializes it, and sets the current struct (self) with the parsed data.
The method uses reqwest::Response::json to parse the JSON body into the
DescribeImagesResp struct and handles any parsing errors by mapping them
to the error::Error::ErrParseResponse variant.
§Arguments
http_response: The HTTP response object received from the API.
§Returns
Ok(()): If the parsing is successful, the method setsselfto the parsed data.Err(error::Error): If there’s a parsing error, the method returns an error.
Source§impl ApiResponse for DescribeInstancesResp
impl ApiResponse for DescribeInstancesResp
Source§async fn to_struct(&mut self, http_response: Response) -> Result<(), Error>
async fn to_struct(&mut self, http_response: Response) -> Result<(), Error>
Processes the HTTP response and populates the DescribeInstancesResp struct.
This function is used for handling the response from the ECS API after a request is sent. It processes the HTTP status, parses the JSON response body, and handles error conditions.
§Parameters
http_response: The HTTP response from the ECS API. This contains the status code and response body.
§Returns
Result<(), error::Error>: ReturnsOk(())if the parsing is successful, or an error if there is an issue.
Source§impl ApiResponse for ModifyInstanceSpecResp
impl ApiResponse for ModifyInstanceSpecResp
Source§impl ApiResponse for RunInstancesResp
impl ApiResponse for RunInstancesResp
Source§impl ApiResponse for StopInstanceResp
impl ApiResponse for StopInstanceResp
Source§impl ApiResponse for StopInstancesResp
impl ApiResponse for StopInstancesResp
Source§impl ApiResponse for DescribeRegionsResp
impl ApiResponse for DescribeRegionsResp
Source§impl ApiResponse for DescribeZonesResp
impl ApiResponse for DescribeZonesResp
Source§impl ApiResponse for AttachUserPolicyResp
impl ApiResponse for AttachUserPolicyResp
Source§async fn to_struct(&mut self, http_response: Response) -> Result<(), Error>
async fn to_struct(&mut self, http_response: Response) -> Result<(), Error>
Converts the HTTP response into a structured response object. This method handles parsing the JSON response from the API server and updating the current object with the parsed data. It also checks the HTTP status code to determine if the request was successful.
Source§impl ApiResponse for CreatePolicyResp
impl ApiResponse for CreatePolicyResp
Source§async fn to_struct(&mut self, http_response: Response) -> Result<(), Error>
async fn to_struct(&mut self, http_response: Response) -> Result<(), Error>
Converts the HTTP response into a structured response object. This method handles parsing the JSON response from the API server and updating the current object with the parsed data. It also checks the HTTP status code to determine if the request was successful.
Source§impl ApiResponse for DeletePolicyResp
impl ApiResponse for DeletePolicyResp
Source§impl ApiResponse for DetachUserPolicyResp
impl ApiResponse for DetachUserPolicyResp
Source§impl ApiResponse for GetPolicyResp
Implementation of the ApiResponse trait for the GetPolicyResp struct.
This implementation is responsible for converting an HTTP response into the GetPolicyResp struct
and handling error cases by updating the response metadata if necessary.
impl ApiResponse for GetPolicyResp
Implementation of the ApiResponse trait for the GetPolicyResp struct.
This implementation is responsible for converting an HTTP response into the GetPolicyResp struct
and handling error cases by updating the response metadata if necessary.
Source§async fn to_struct(&mut self, http_response: Response) -> Result<(), Error>
async fn to_struct(&mut self, http_response: Response) -> Result<(), Error>
Converts an HTTP response into the GetPolicyResp struct.
It first checks the HTTP status code, parses the JSON response body,
updates the current GetPolicyResp instance with the parsed data,
and if the request was not successful, it updates the response metadata with the error code.
§Arguments
&mut self: A mutable reference to theGetPolicyRespinstance.http_response: Areqwest::Responsecontaining the HTTP response data.
§Returns
- On success, returns
Ok(()). - On error, returns an
Errorstruct indicating the reason for the failure, such as a parsing error.
Source§impl ApiResponse for ListAttachedUserPoliciesResp
Implementation of the ApiResponse trait for the ListAttachedUserPoliciesResp struct.
This implementation is responsible for converting an HTTP response into the ListAttachedUserPoliciesResp struct
and handling error cases by updating the response metadata if necessary.
impl ApiResponse for ListAttachedUserPoliciesResp
Implementation of the ApiResponse trait for the ListAttachedUserPoliciesResp struct.
This implementation is responsible for converting an HTTP response into the ListAttachedUserPoliciesResp struct
and handling error cases by updating the response metadata if necessary.
Source§async fn to_struct(&mut self, http_response: Response) -> Result<(), Error>
async fn to_struct(&mut self, http_response: Response) -> Result<(), Error>
Converts an HTTP response into the ListAttachedUserPoliciesResp struct.
It first checks the HTTP status code, parses the JSON response body,
updates the current ListAttachedUserPoliciesResp instance with the parsed data,
and if the request was not successful, it updates the response metadata with the error code.
§Arguments
&mut self: A mutable reference to theListAttachedUserPoliciesRespinstance.http_response: Areqwest::Responsecontaining the HTTP response data.
§Returns
- On success, returns
Ok(()). - On error, returns an
Errorstruct indicating the reason for the failure, such as a parsing error.
Source§impl ApiResponse for ListPoliciesResp
Implementation of the ApiResponse trait for the ListPoliciesResp struct.
This implementation is responsible for converting an HTTP response into the ListPoliciesResp struct.
It parses the JSON response body and updates the current instance with the parsed data.
impl ApiResponse for ListPoliciesResp
Implementation of the ApiResponse trait for the ListPoliciesResp struct.
This implementation is responsible for converting an HTTP response into the ListPoliciesResp struct.
It parses the JSON response body and updates the current instance with the parsed data.
Source§async fn to_struct(&mut self, http_response: Response) -> Result<(), Error>
async fn to_struct(&mut self, http_response: Response) -> Result<(), Error>
Converts an HTTP response into the ListPoliciesResp struct.
It first parses the JSON response body, then updates the current ListPoliciesResp instance
with the parsed data. If there is an error during parsing, it returns an Error struct.
§Arguments
&mut self: A mutable reference to theListPoliciesRespinstance.http_response: Areqwest::Responsecontaining the HTTP response data.
§Returns
- On success, returns
Ok(()). - On error, returns an
Errorstruct indicating the reason for the failure, such as a parsing error.
Source§impl ApiResponse for UpdatePolicyResp
Implements the ApiResponse trait for the UpdatePolicyResp struct.
This implementation is responsible for converting an HTTP response into the UpdatePolicyResp struct
and handling error cases by updating the response metadata when necessary.
impl ApiResponse for UpdatePolicyResp
Implements the ApiResponse trait for the UpdatePolicyResp struct.
This implementation is responsible for converting an HTTP response into the UpdatePolicyResp struct
and handling error cases by updating the response metadata when necessary.
Source§async fn to_struct(&mut self, http_response: Response) -> Result<(), Error>
async fn to_struct(&mut self, http_response: Response) -> Result<(), Error>
Converts an HTTP response into the UpdatePolicyResp struct.
It first checks the HTTP status code, parses the JSON response body,
updates the current UpdatePolicyResp instance with the parsed data,
and if the request was not successful, it updates the response metadata with the error code.
§Arguments
&mut self: A mutable reference to theUpdatePolicyRespinstance.http_response: Areqwest::Responsecontaining the HTTP response data.
§Returns
- On success, returns
Ok(()). - On error, returns an
Errorstruct indicating the reason for the failure, such as a parsing error.
Source§impl ApiResponse for CreateProjectResp
impl ApiResponse for CreateProjectResp
Source§impl ApiResponse for GetProjectResp
Implementation of the ApiResponse trait for the GetProjectResp struct.
This implementation is responsible for converting an HTTP response into the GetProjectResp struct
and handling error cases by updating the response metadata accordingly.
impl ApiResponse for GetProjectResp
Implementation of the ApiResponse trait for the GetProjectResp struct.
This implementation is responsible for converting an HTTP response into the GetProjectResp struct
and handling error cases by updating the response metadata accordingly.
Source§async fn to_struct(&mut self, http_response: Response) -> Result<(), Error>
async fn to_struct(&mut self, http_response: Response) -> Result<(), Error>
Converts an HTTP response into the GetProjectResp struct.
It first retrieves the HTTP status code, parses the JSON response body,
updates the current GetProjectResp instance with the parsed data,
and if the request was not successful, it updates the response metadata with the error information.
§Arguments
&mut self: A mutable reference to theGetProjectRespinstance.http_response: Areqwest::Responsecontaining the HTTP response data.
§Returns
- On success, returns
Ok(()). - On error, returns an
Errorstruct indicating the reason for the failure, such as a parsing error.
Source§impl ApiResponse for CreateLoginProfileResp
impl ApiResponse for CreateLoginProfileResp
Source§impl ApiResponse for CreateUserResp
impl ApiResponse for CreateUserResp
Source§impl ApiResponse for DeleteLoginProfileResp
impl ApiResponse for DeleteLoginProfileResp
Source§async fn to_struct(&mut self, http_response: Response) -> Result<(), Error>
async fn to_struct(&mut self, http_response: Response) -> Result<(), Error>
Converts the HTTP response into a structured response object This method handles parsing the JSON response from the API server and updating the current object with the parsed data It also checks the HTTP status code to determine if the request was successful
Source§impl ApiResponse for DeleteUserResp
impl ApiResponse for DeleteUserResp
Source§async fn to_struct(&mut self, http_response: Response) -> Result<(), Error>
async fn to_struct(&mut self, http_response: Response) -> Result<(), Error>
Converts the HTTP response into a structured response object This method handles parsing the JSON response from the API server and updating the current object with the parsed data It also checks the HTTP status code to determine if the request was successful
Source§impl ApiResponse for GetLoginProfileResp
Implementation of the ApiResponse trait for the GetLoginProfileResp struct.
This implementation provides a method to convert an HTTP response into the GetLoginProfileResp struct.
impl ApiResponse for GetLoginProfileResp
Implementation of the ApiResponse trait for the GetLoginProfileResp struct.
This implementation provides a method to convert an HTTP response into the GetLoginProfileResp struct.
Source§async fn to_struct(&mut self, http_response: Response) -> Result<(), Error>
async fn to_struct(&mut self, http_response: Response) -> Result<(), Error>
Converts an HTTP response into the GetLoginProfileResp struct.
It also handles error cases and updates the response metadata if the HTTP status is not successful.
§Arguments
&mut self: A mutable reference to theGetLoginProfileRespinstance.http_response: Areqwest::Responsecontaining the HTTP response data.
§Returns
- On success, returns
Ok(()). - On error, returns an
Errorstruct indicating the reason for the failure, such as a parsing error.
Source§impl ApiResponse for GetSecurityConfigResp
Implementation of the ApiResponse trait for the GetSecurityConfigResp struct.
This implementation is responsible for converting an HTTP response into the GetSecurityConfigResp struct.
impl ApiResponse for GetSecurityConfigResp
Implementation of the ApiResponse trait for the GetSecurityConfigResp struct.
This implementation is responsible for converting an HTTP response into the GetSecurityConfigResp struct.
Source§async fn to_struct(&mut self, http_response: Response) -> Result<(), Error>
async fn to_struct(&mut self, http_response: Response) -> Result<(), Error>
Converts an HTTP response into the GetSecurityConfigResp struct.
It first parses the JSON response body and then updates the current GetSecurityConfigResp instance
with the parsed data.
§Arguments
&mut self: A mutable reference to theGetSecurityConfigRespinstance.http_response: Areqwest::Responsecontaining the HTTP response data.
§Returns
- On success, returns
Ok(()). - On error, returns an
Errorstruct indicating the reason for the failure, such as a parsing error.
Source§impl ApiResponse for GetUserResp
Implementation of the ApiResponse trait for the GetUserResp struct.
This implementation is responsible for converting an HTTP response into the GetUserResp struct
and handling error cases by updating the response metadata if necessary.
impl ApiResponse for GetUserResp
Implementation of the ApiResponse trait for the GetUserResp struct.
This implementation is responsible for converting an HTTP response into the GetUserResp struct
and handling error cases by updating the response metadata if necessary.
Source§async fn to_struct(&mut self, http_response: Response) -> Result<(), Error>
async fn to_struct(&mut self, http_response: Response) -> Result<(), Error>
Converts an HTTP response into the GetUserResp struct.
It first checks the HTTP status code, parses the JSON response body,
updates the current GetUserResp instance with the parsed data,
and if the request was not successful, it updates the response metadata with the error code.
§Arguments
&mut self: A mutable reference to theGetUserRespinstance.http_response: Areqwest::Responsecontaining the HTTP response data.
§Returns
- On success, returns
Ok(()). - On error, returns an
Errorstruct indicating the reason for the failure, such as a parsing error.
Source§impl ApiResponse for SetSecurityConfigResp
Implementation of the ApiResponse trait for the SetSecurityConfigResp struct.
This implementation is responsible for converting an HTTP response into the SetSecurityConfigResp struct.
impl ApiResponse for SetSecurityConfigResp
Implementation of the ApiResponse trait for the SetSecurityConfigResp struct.
This implementation is responsible for converting an HTTP response into the SetSecurityConfigResp struct.
Source§async fn to_struct(&mut self, http_response: Response) -> Result<(), Error>
async fn to_struct(&mut self, http_response: Response) -> Result<(), Error>
Converts an HTTP response into the SetSecurityConfigResp struct.
It first parses the JSON response body, then updates the current SetSecurityConfigResp instance
with the parsed data. If there is an error during parsing, it returns an Error struct.
§Arguments
&mut self: A mutable reference to theSetSecurityConfigRespinstance.http_response: Areqwest::Responsecontaining the HTTP response data.
§Returns
- On success, returns
Ok(()). - On error, returns an
Errorstruct indicating the reason for the failure, such as a parsing error.
Source§impl ApiResponse for UpdateLoginProfileResp
Implementation of the ApiResponse trait for the UpdateLoginProfileResp struct.
This implementation is responsible for converting an HTTP response into the UpdateLoginProfileResp struct.
impl ApiResponse for UpdateLoginProfileResp
Implementation of the ApiResponse trait for the UpdateLoginProfileResp struct.
This implementation is responsible for converting an HTTP response into the UpdateLoginProfileResp struct.
Source§async fn to_struct(&mut self, http_response: Response) -> Result<(), Error>
async fn to_struct(&mut self, http_response: Response) -> Result<(), Error>
Converts an HTTP response into the UpdateLoginProfileResp struct.
It first parses the JSON response body, then updates the current UpdateLoginProfileResp instance
with the parsed data. If there is an error during parsing, it returns an Error struct.
§Arguments
&mut self: A mutable reference to theUpdateLoginProfileRespinstance.http_response: Areqwest::Responsecontaining the HTTP response data.
§Returns
- On success, returns
Ok(()). - On error, returns an
Errorstruct indicating the reason for the failure, such as a parsing error.
Source§impl ApiResponse for UpdateUserResp
Implementation of the ApiResponse trait for the UpdateUserResp struct.
This implementation is responsible for converting an HTTP response into the UpdateUserResp struct.
impl ApiResponse for UpdateUserResp
Implementation of the ApiResponse trait for the UpdateUserResp struct.
This implementation is responsible for converting an HTTP response into the UpdateUserResp struct.
Source§async fn to_struct(&mut self, http_response: Response) -> Result<(), Error>
async fn to_struct(&mut self, http_response: Response) -> Result<(), Error>
Converts an HTTP response into the UpdateUserResp struct.
It first parses the JSON response body, then updates the current UpdateUserResp instance
with the parsed data. If there is an error during parsing, it returns an Error struct.
§Arguments
&mut self: A mutable reference to theUpdateUserRespinstance.http_response: Areqwest::Responsecontaining the HTTP response data.
§Returns
- On success, returns
Ok(()). - On error, returns an
Errorstruct indicating the reason for the failure, such as a parsing error.
Source§impl ApiResponse for CreateDbAccountResp
Implements the ApiResponse trait for the CreateDbAccountResp struct.
This implementation is responsible for converting an HTTP response into the CreateDbAccountResp struct.
impl ApiResponse for CreateDbAccountResp
Implements the ApiResponse trait for the CreateDbAccountResp struct.
This implementation is responsible for converting an HTTP response into the CreateDbAccountResp struct.
Source§async fn to_struct(&mut self, http_response: Response) -> Result<(), Error>
async fn to_struct(&mut self, http_response: Response) -> Result<(), Error>
Converts an HTTP response into the CreateDbAccountResp struct.
It first parses the JSON response body, then updates the current CreateDbAccountResp instance
with the parsed data. If there is an error during parsing, it returns an Error struct.
§Arguments
&mut self: A mutable reference to theCreateDbAccountRespinstance.http_response: Areqwest::Responsecontaining the HTTP response data.
§Returns
- On success, returns
Ok(()). - On error, returns an
Errorstruct indicating the reason for the failure, such as a parsing error.
Source§impl ApiResponse for DescribeDbAccountsResp
Implementation of the ApiResponse trait for the DescribeDbAccountsResp structure.
This implementation provides the necessary methods to parse the HTTP response into a structured response object.
impl ApiResponse for DescribeDbAccountsResp
Implementation of the ApiResponse trait for the DescribeDbAccountsResp structure.
This implementation provides the necessary methods to parse the HTTP response into a structured response object.
Source§async fn to_struct(&mut self, http_response: Response) -> Result<(), Error>
async fn to_struct(&mut self, http_response: Response) -> Result<(), Error>
Deserializes the HTTP response into a structured response object.
This method takes an http_response object, parses its JSON body, and updates the current response object with the parsed data.
§Arguments
http_response- The HTTP response object received from the server.
§Returns
Result<(), error::Error>- ReturnsOk(())if the response is successfully parsed, or an error if parsing fails.
Source§impl ApiResponse for ModifyAllowListResp
Implementation of the ApiResponse trait for the ModifyAllowListResp structure.
This implementation provides the necessary methods to parse the HTTP response into a structured response object.
impl ApiResponse for ModifyAllowListResp
Implementation of the ApiResponse trait for the ModifyAllowListResp structure.
This implementation provides the necessary methods to parse the HTTP response into a structured response object.
Source§async fn to_struct(&mut self, http_response: Response) -> Result<(), Error>
async fn to_struct(&mut self, http_response: Response) -> Result<(), Error>
Deserializes the HTTP response into a structured response object.
This method takes an http_response object, parses its JSON body, and updates the current response object with the parsed data.
§Arguments
http_response- The HTTP response object received from the server.
§Returns
Result<(), error::Error>- ReturnsOk(())if the response is successfully parsed, or an error if parsing fails.
Source§impl ApiResponse for CreateDatabaseResp
Implements the ApiResponse trait for the CreateDatabaseResp struct.
This is responsible for converting an HTTP response into the CreateDatabaseResp struct
and handling error cases by updating the response metadata if the request was not successful.
impl ApiResponse for CreateDatabaseResp
Implements the ApiResponse trait for the CreateDatabaseResp struct.
This is responsible for converting an HTTP response into the CreateDatabaseResp struct
and handling error cases by updating the response metadata if the request was not successful.
Source§async fn to_struct(&mut self, http_response: Response) -> Result<(), Error>
async fn to_struct(&mut self, http_response: Response) -> Result<(), Error>
Converts an HTTP response into the CreateDatabaseResp struct.
It first retrieves the HTTP status code, parses the JSON response body,
updates the current CreateDatabaseResp instance with the parsed data,
and if the request was not successful, it updates the response metadata with the error information.
§Arguments
&mut self: A mutable reference to theCreateDatabaseRespinstance.http_response: Areqwest::Responsecontaining the HTTP response data.
§Returns
- On success, returns
Ok(()). - On error, returns an
Errorstruct indicating the reason for the failure, such as a parsing error.
Source§impl ApiResponse for DescribeDatabasesResp
Implementation of the ApiResponse trait for the DescribeDatabasesResp structure.
This implementation provides the necessary methods to parse the HTTP response into a structured response object.
impl ApiResponse for DescribeDatabasesResp
Implementation of the ApiResponse trait for the DescribeDatabasesResp structure.
This implementation provides the necessary methods to parse the HTTP response into a structured response object.
Source§async fn to_struct(&mut self, http_response: Response) -> Result<(), Error>
async fn to_struct(&mut self, http_response: Response) -> Result<(), Error>
Deserializes the HTTP response into a structured response object.
This method takes an http_response object, parses its JSON body, and updates the current response object with the parsed data.
§Arguments
http_response- The HTTP response object received from the server.
§Returns
Result<(), error::Error>- ReturnsOk(())if the response is successfully parsed, or an error if parsing fails.
Source§impl ApiResponse for CreateDbEndpointResp
Implements the ApiResponse trait for the CreateDbEndpointResp struct.
This implementation is in charge of converting an HTTP response into the
CreateDbEndpointResp struct. It parses the JSON response body and updates
the current instance with the parsed data.
impl ApiResponse for CreateDbEndpointResp
Implements the ApiResponse trait for the CreateDbEndpointResp struct.
This implementation is in charge of converting an HTTP response into the
CreateDbEndpointResp struct. It parses the JSON response body and updates
the current instance with the parsed data.
Source§async fn to_struct(&mut self, http_response: Response) -> Result<(), Error>
async fn to_struct(&mut self, http_response: Response) -> Result<(), Error>
Converts an HTTP response into the CreateDbEndpointResp struct.
First, it parses the JSON response body. Then, it updates the current
CreateDbEndpointResp instance with the parsed data. If there is an error
during parsing, it returns an Error struct.
§Arguments
&mut self: A mutable reference to theCreateDbEndpointRespinstance.http_response: Areqwest::Responsecontaining the HTTP response data.
§Returns
- On success, returns
Ok(()). - On error, returns an
Errorstruct indicating the reason for the failure, such as a parsing error.
Source§impl ApiResponse for ModifyDbEndpointResp
Implementation of the ApiResponse trait for the ModifyDbEndpointResp structure.
This implementation provides the necessary methods to parse the HTTP response into a structured response object.
impl ApiResponse for ModifyDbEndpointResp
Implementation of the ApiResponse trait for the ModifyDbEndpointResp structure.
This implementation provides the necessary methods to parse the HTTP response into a structured response object.
Source§async fn to_struct(&mut self, http_response: Response) -> Result<(), Error>
async fn to_struct(&mut self, http_response: Response) -> Result<(), Error>
Deserializes the HTTP response into a structured response object.
This method takes an http_response object, parses its JSON body, and updates the current response object with the parsed data.
§Arguments
http_response- The HTTP response object received from the server.
§Returns
Result<(), error::Error>- ReturnsOk(())if the response is successfully parsed, or an error if parsing fails.
Source§impl ApiResponse for CreateDbInstanceResp
Implementation of the ApiResponse trait for the CreateDbInstanceResp structure.
This implementation provides the necessary methods to parse the HTTP response into a structured response object.
impl ApiResponse for CreateDbInstanceResp
Implementation of the ApiResponse trait for the CreateDbInstanceResp structure.
This implementation provides the necessary methods to parse the HTTP response into a structured response object.
Source§async fn to_struct(&mut self, http_response: Response) -> Result<(), Error>
async fn to_struct(&mut self, http_response: Response) -> Result<(), Error>
Deserializes the HTTP response into a structured response object.
This method takes an http_response object, parses its JSON body, and updates the current response object with the parsed data.
§Arguments
http_response- The HTTP response object received from the server.
§Returns
Result<(), error::Error>- ReturnsOk(())if the response is successfully parsed, or an error if parsing fails.
Source§impl ApiResponse for DescribeDbInstanceDetailResp
Implementation of the ApiResponse trait for the DescribeDbInstanceDetailResp structure.
This implementation provides the necessary methods to parse the HTTP response into a structured response object.
impl ApiResponse for DescribeDbInstanceDetailResp
Implementation of the ApiResponse trait for the DescribeDbInstanceDetailResp structure.
This implementation provides the necessary methods to parse the HTTP response into a structured response object.
Source§async fn to_struct(&mut self, http_response: Response) -> Result<(), Error>
async fn to_struct(&mut self, http_response: Response) -> Result<(), Error>
Deserializes the HTTP response into a structured response object.
This method takes an http_response object, parses its JSON body, and updates the current response object with the parsed data.
§Arguments
http_response- The HTTP response object received from the server.
§Returns
Result<(), error::Error>- ReturnsOk(())if the response is successfully parsed, or an error if parsing fails.
Source§impl ApiResponse for DescribeDbInstancesResp
Implementation of the ApiResponse trait for the DescribeDbInstancesResp structure.
This implementation provides the necessary methods to parse the HTTP response into a structured response object.
impl ApiResponse for DescribeDbInstancesResp
Implementation of the ApiResponse trait for the DescribeDbInstancesResp structure.
This implementation provides the necessary methods to parse the HTTP response into a structured response object.
Source§async fn to_struct(&mut self, http_response: Response) -> Result<(), Error>
async fn to_struct(&mut self, http_response: Response) -> Result<(), Error>
Deserializes the HTTP response into a structured response object.
This method takes an http_response object, parses its JSON body, and updates the current response object with the parsed data.
§Arguments
http_response- The HTTP response object received from the server.
§Returns
Result<(), error::Error>- ReturnsOk(())if the response is successfully parsed, or an error if parsing fails.
Source§impl ApiResponse for ModifyDbInstanceSpecResp
Implementation of the ApiResponse trait for the ModifyDbInstanceSpecResp structure.
This implementation provides the necessary methods to parse the HTTP response into a structured response object.
impl ApiResponse for ModifyDbInstanceSpecResp
Implementation of the ApiResponse trait for the ModifyDbInstanceSpecResp structure.
This implementation provides the necessary methods to parse the HTTP response into a structured response object.
Source§async fn to_struct(&mut self, http_response: Response) -> Result<(), Error>
async fn to_struct(&mut self, http_response: Response) -> Result<(), Error>
Deserializes the HTTP response into a structured response object.
This method takes an http_response object, parses its JSON body, and updates the current response object with the parsed data.
§Arguments
http_response- The HTTP response object received from the server.
§Returns
Result<(), error::Error>- ReturnsOk(())if the response is successfully parsed, or an error if parsing fails.
Source§impl ApiResponse for RedisModifyAllowListResp
Implementation of the ApiResponse trait for the ModifyAllowListResp structure.
This implementation provides the necessary methods to parse the HTTP response into a structured response object.
impl ApiResponse for RedisModifyAllowListResp
Implementation of the ApiResponse trait for the ModifyAllowListResp structure.
This implementation provides the necessary methods to parse the HTTP response into a structured response object.
Source§async fn to_struct(&mut self, http_response: Response) -> Result<(), Error>
async fn to_struct(&mut self, http_response: Response) -> Result<(), Error>
Deserializes the HTTP response into a structured response object.
This method takes an http_response object, parses its JSON body, and updates the current response object with the parsed data.
§Arguments
http_response- The HTTP response object received from the server.
§Returns
Result<(), error::Error>- ReturnsOk(())if the response is successfully parsed, or an error if parsing fails.
Source§impl ApiResponse for RedisCreateDbInstanceResp
Implementation of the ApiResponse trait for the CreateDbInstanceResp structure.
This implementation provides the necessary methods to parse the HTTP response into a structured response object.
impl ApiResponse for RedisCreateDbInstanceResp
Implementation of the ApiResponse trait for the CreateDbInstanceResp structure.
This implementation provides the necessary methods to parse the HTTP response into a structured response object.
Source§async fn to_struct(&mut self, http_response: Response) -> Result<(), Error>
async fn to_struct(&mut self, http_response: Response) -> Result<(), Error>
Deserializes the HTTP response into a structured response object.
This method takes an http_response object, parses its JSON body, and updates the current response object with the parsed data.
§Arguments
http_response- The HTTP response object received from the server.
§Returns
Result<(), error::Error>- ReturnsOk(())if the response is successfully parsed, or an error if parsing fails.
Source§impl ApiResponse for RedisDecreaseDbInstanceNodeNumberResp
Implementation of the ApiResponse trait for the DecreaseDbInstanceNodeNumberResp structure.
This implementation enables the DecreaseDbInstanceNodeNumberResp to parse an HTTP response
into a structured response object. It provides a method to deserialize the JSON body of the HTTP response
and update the current response object with the parsed data.
impl ApiResponse for RedisDecreaseDbInstanceNodeNumberResp
Implementation of the ApiResponse trait for the DecreaseDbInstanceNodeNumberResp structure.
This implementation enables the DecreaseDbInstanceNodeNumberResp to parse an HTTP response
into a structured response object. It provides a method to deserialize the JSON body of the HTTP response
and update the current response object with the parsed data.
Source§async fn to_struct(&mut self, http_response: Response) -> Result<(), Error>
async fn to_struct(&mut self, http_response: Response) -> Result<(), Error>
Deserializes the HTTP response into a structured response object.
This asynchronous method takes an http_response object, which represents the HTTP response received from the server.
It attempts to parse the JSON body of the response into a DecreaseDbInstanceNodeNumberResp object.
If the parsing is successful, it updates the current response object with the parsed data.
§Arguments
http_response- The HTTP response object received from the server.
§Returns
Result<(), error::Error>- ReturnsOk(())if the response is successfully parsed, or anerror::Errorif parsing fails. The error typeErrParseResponseis used to indicate a failure during the JSON parsing process.
Source§impl ApiResponse for RedisDescribeDbInstanceDetailResp
Implementation of the ApiResponse trait for the DescribeDbInstanceDetailResp structure.
This implementation provides the necessary methods to parse the HTTP response into a structured response object.
impl ApiResponse for RedisDescribeDbInstanceDetailResp
Implementation of the ApiResponse trait for the DescribeDbInstanceDetailResp structure.
This implementation provides the necessary methods to parse the HTTP response into a structured response object.
Source§async fn to_struct(&mut self, http_response: Response) -> Result<(), Error>
async fn to_struct(&mut self, http_response: Response) -> Result<(), Error>
Deserializes the HTTP response into a structured response object.
This method takes an http_response object, parses its JSON body, and updates the current response object with the parsed data.
§Arguments
http_response- The HTTP response object received from the server.
§Returns
Result<(), error::Error>- ReturnsOk(())if the response is successfully parsed, or an error if parsing fails.
Source§impl ApiResponse for RedisDescribeDbInstancesResp
Implementation of the ApiResponse trait for the RedisDescribeDbInstancesResp structure.
This implementation provides the necessary methods to parse the HTTP response into a structured response object.
impl ApiResponse for RedisDescribeDbInstancesResp
Implementation of the ApiResponse trait for the RedisDescribeDbInstancesResp structure.
This implementation provides the necessary methods to parse the HTTP response into a structured response object.
Source§async fn to_struct(&mut self, http_response: Response) -> Result<(), Error>
async fn to_struct(&mut self, http_response: Response) -> Result<(), Error>
Deserializes the HTTP response into a structured response object.
This method takes an http_response object, parses its JSON body, and updates the current response object with the parsed data.
§Arguments
http_response- The HTTP response object received from the server.
§Returns
Result<(), error::Error>- ReturnsOk(())if the response is successfully parsed, or an error if parsing fails.
Source§impl ApiResponse for RedisEnableShardedClusterResp
Implementation of the ApiResponse trait for the DecreaseDbInstanceNodeNumberResp structure.
This implementation enables the DecreaseDbInstanceNodeNumberResp to parse an HTTP response
into a structured response object. It provides a method to deserialize the JSON body of the HTTP response
and update the current response object with the parsed data.
impl ApiResponse for RedisEnableShardedClusterResp
Implementation of the ApiResponse trait for the DecreaseDbInstanceNodeNumberResp structure.
This implementation enables the DecreaseDbInstanceNodeNumberResp to parse an HTTP response
into a structured response object. It provides a method to deserialize the JSON body of the HTTP response
and update the current response object with the parsed data.
Source§async fn to_struct(&mut self, http_response: Response) -> Result<(), Error>
async fn to_struct(&mut self, http_response: Response) -> Result<(), Error>
Deserializes the HTTP response into a structured response object.
This asynchronous method takes an http_response object, which represents the HTTP response received from the server.
It attempts to parse the JSON body of the response into a DecreaseDbInstanceNodeNumberResp object.
If the parsing is successful, it updates the current response object with the parsed data.
§Arguments
http_response- The HTTP response object received from the server.
§Returns
Result<(), error::Error>- ReturnsOk(())if the response is successfully parsed, or anerror::Errorif parsing fails. The error typeErrParseResponseis used to indicate a failure during the JSON parsing process.
Source§impl ApiResponse for RedisIncreaseDbInstanceNodeNumberResp
Implementation of the ApiResponse trait for the IncreaseDbInstanceNodeNumberResp structure.
This implementation enables the IncreaseDbInstanceNodeNumberResp to parse an HTTP response
into a structured response object. It provides a method to deserialize the JSON body of the HTTP response
and update the current response object with the parsed data.
impl ApiResponse for RedisIncreaseDbInstanceNodeNumberResp
Implementation of the ApiResponse trait for the IncreaseDbInstanceNodeNumberResp structure.
This implementation enables the IncreaseDbInstanceNodeNumberResp to parse an HTTP response
into a structured response object. It provides a method to deserialize the JSON body of the HTTP response
and update the current response object with the parsed data.
Source§async fn to_struct(&mut self, http_response: Response) -> Result<(), Error>
async fn to_struct(&mut self, http_response: Response) -> Result<(), Error>
Deserializes the HTTP response into a structured response object.
This asynchronous method takes an http_response object, which represents the HTTP response received from the server.
It attempts to parse the JSON body of the response into an IncreaseDbInstanceNodeNumberResp object.
If the parsing is successful, it updates the current response object with the parsed data.
§Arguments
http_response- The HTTP response object received from the server.
§Returns
Result<(), error::Error>- ReturnsOk(())if the response is successfully parsed, or anerror::Errorif parsing fails. The error typeErrParseResponseis used to indicate a failure during the JSON parsing process.
Source§impl ApiResponse for RedisModifyDbInstanceShardCapacityResp
Implementation of the ApiResponse trait for the IncreaseDbInstanceNodeNumberResp structure.
This implementation enables the IncreaseDbInstanceNodeNumberResp to parse an HTTP response
into a structured response object. It provides a method to deserialize the JSON body of the HTTP response
and update the current response object with the parsed data.
impl ApiResponse for RedisModifyDbInstanceShardCapacityResp
Implementation of the ApiResponse trait for the IncreaseDbInstanceNodeNumberResp structure.
This implementation enables the IncreaseDbInstanceNodeNumberResp to parse an HTTP response
into a structured response object. It provides a method to deserialize the JSON body of the HTTP response
and update the current response object with the parsed data.
Source§async fn to_struct(&mut self, http_response: Response) -> Result<(), Error>
async fn to_struct(&mut self, http_response: Response) -> Result<(), Error>
Deserializes the HTTP response into a structured response object.
This asynchronous method takes an http_response object, which represents the HTTP response received from the server.
It attempts to parse the JSON body of the response into an IncreaseDbInstanceNodeNumberResp object.
If the parsing is successful, it updates the current response object with the parsed data.
§Arguments
http_response- The HTTP response object received from the server.
§Returns
Result<(), error::Error>- ReturnsOk(())if the response is successfully parsed, or anerror::Errorif parsing fails. The error typeErrParseResponseis used to indicate a failure during the JSON parsing process.
Source§impl ApiResponse for RedisModifyDbInstanceShardNumberResp
Implementation of the ApiResponse trait for the ModifyDbInstanceShardNumberResp structure.
This implementation enables the ModifyDbInstanceShardNumberResp to parse an HTTP response
into a structured response object. It provides a method to deserialize the JSON body of the HTTP response
and update the current response object with the parsed data.
impl ApiResponse for RedisModifyDbInstanceShardNumberResp
Implementation of the ApiResponse trait for the ModifyDbInstanceShardNumberResp structure.
This implementation enables the ModifyDbInstanceShardNumberResp to parse an HTTP response
into a structured response object. It provides a method to deserialize the JSON body of the HTTP response
and update the current response object with the parsed data.
Source§async fn to_struct(&mut self, http_response: Response) -> Result<(), Error>
async fn to_struct(&mut self, http_response: Response) -> Result<(), Error>
Deserializes the HTTP response into a structured response object.
This asynchronous method takes an http_response object, which represents the HTTP response received from the server.
It attempts to parse the JSON body of the response into a ModifyDbInstanceShardNumberResp object.
If the parsing is successful, it updates the current response object with the parsed data.
§Arguments
http_response- The HTTP response object received from the server.
§Returns
Result<(), error::Error>- ReturnsOk(())if the response is successfully parsed, or anerror::Errorif parsing fails. The error typeErrParseResponseis used to indicate a failure during the JSON parsing process.
Source§impl ApiResponse for DescribeSubnetsResp
Implementation of the ApiResponse trait for the DescribeSubnetsResp structure.
This implementation provides the necessary methods to parse the HTTP response into a structured response object.
impl ApiResponse for DescribeSubnetsResp
Implementation of the ApiResponse trait for the DescribeSubnetsResp structure.
This implementation provides the necessary methods to parse the HTTP response into a structured response object.
Source§async fn to_struct(&mut self, http_response: Response) -> Result<(), Error>
async fn to_struct(&mut self, http_response: Response) -> Result<(), Error>
Deserializes the HTTP response into a structured response object.
This method takes an http_response object, parses its JSON body, and updates the current response object with the parsed data.
§Arguments
http_response- The HTTP response object received from the server.
§Returns
Result<(), error::Error>- ReturnsOk(())if the response is successfully parsed, or an error if parsing fails.
Source§impl ApiResponse for DescribeVpcsResp
Implementation of the ApiResponse trait for the DescribeVpcsResp structure.
This implementation provides the necessary methods to parse the HTTP response into a structured response object.
impl ApiResponse for DescribeVpcsResp
Implementation of the ApiResponse trait for the DescribeVpcsResp structure.
This implementation provides the necessary methods to parse the HTTP response into a structured response object.
Source§async fn to_struct(&mut self, http_response: Response) -> Result<(), Error>
async fn to_struct(&mut self, http_response: Response) -> Result<(), Error>
Deserializes the HTTP response into a structured response object.
This method takes an http_response object, parses its JSON body, and updates the current response object with the parsed data.
§Arguments
http_response- The HTTP response object received from the server.
§Returns
Result<(), error::Error>- ReturnsOk(())if the response is successfully parsed, or an error if parsing fails.