#[non_exhaustive]pub struct TerraformError {
pub resource_address: String,
pub http_response_code: i32,
pub error_description: String,
pub error: Option<Status>,
/* private fields */
}Expand description
Errors encountered during actuation using Terraform
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.resource_address: StringAddress of the resource associated with the error,
e.g. google_compute_network.vpc_network.
http_response_code: i32HTTP response code returned from Google Cloud Platform APIs when Terraform fails to provision the resource. If unset or 0, no HTTP response code was returned by Terraform.
error_description: StringA human-readable error description.
error: Option<Status>Output only. Original error response from underlying Google API, if available.
Implementations§
Source§impl TerraformError
impl TerraformError
pub fn new() -> Self
Sourcepub fn set_resource_address<T: Into<String>>(self, v: T) -> Self
pub fn set_resource_address<T: Into<String>>(self, v: T) -> Self
Sets the value of resource_address.
§Example
ⓘ
let x = TerraformError::new().set_resource_address("example");Sourcepub fn set_http_response_code<T: Into<i32>>(self, v: T) -> Self
pub fn set_http_response_code<T: Into<i32>>(self, v: T) -> Self
Sets the value of http_response_code.
§Example
ⓘ
let x = TerraformError::new().set_http_response_code(42);Sourcepub fn set_error_description<T: Into<String>>(self, v: T) -> Self
pub fn set_error_description<T: Into<String>>(self, v: T) -> Self
Sets the value of error_description.
§Example
ⓘ
let x = TerraformError::new().set_error_description("example");Sourcepub fn set_or_clear_error<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_error<T>(self, v: Option<T>) -> Self
Trait Implementations§
Source§impl Clone for TerraformError
impl Clone for TerraformError
Source§fn clone(&self) -> TerraformError
fn clone(&self) -> TerraformError
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TerraformError
impl Debug for TerraformError
Source§impl Default for TerraformError
impl Default for TerraformError
Source§fn default() -> TerraformError
fn default() -> TerraformError
Returns the “default value” for a type. Read more
Source§impl Message for TerraformError
impl Message for TerraformError
Source§impl PartialEq for TerraformError
impl PartialEq for TerraformError
impl StructuralPartialEq for TerraformError
Auto Trait Implementations§
impl Freeze for TerraformError
impl RefUnwindSafe for TerraformError
impl Send for TerraformError
impl Sync for TerraformError
impl Unpin for TerraformError
impl UnwindSafe for TerraformError
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