#[non_exhaustive]pub struct GetFieldLevelEncryptionProfileConfigError {
pub kind: GetFieldLevelEncryptionProfileConfigErrorKind,
/* private fields */
}
Expand description
Error type for the GetFieldLevelEncryptionProfileConfig
operation.
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.kind: GetFieldLevelEncryptionProfileConfigErrorKind
Kind of error that occurred.
Implementations§
source§impl GetFieldLevelEncryptionProfileConfigError
impl GetFieldLevelEncryptionProfileConfigError
sourcepub fn new(
kind: GetFieldLevelEncryptionProfileConfigErrorKind,
meta: Error
) -> Self
pub fn new(
kind: GetFieldLevelEncryptionProfileConfigErrorKind,
meta: Error
) -> Self
Creates a new GetFieldLevelEncryptionProfileConfigError
.
sourcepub fn unhandled(err: impl Into<Box<dyn Error + Send + Sync + 'static>>) -> Self
pub fn unhandled(err: impl Into<Box<dyn Error + Send + Sync + 'static>>) -> Self
Creates the GetFieldLevelEncryptionProfileConfigError::Unhandled
variant from any error type.
Examples found in repository?
src/operation_deser.rs (line 6867)
6856 6857 6858 6859 6860 6861 6862 6863 6864 6865 6866 6867 6868 6869 6870 6871 6872 6873 6874 6875 6876 6877 6878 6879 6880 6881 6882 6883 6884 6885 6886 6887 6888 6889 6890 6891 6892 6893 6894 6895 6896 6897 6898 6899 6900 6901 6902 6903 6904 6905 6906 6907 6908 6909 6910 6911 6912 6913 6914 6915 6916 6917 6918 6919 6920 6921 6922 6923 6924 6925 6926
pub fn parse_get_field_level_encryption_profile_config_error(
response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
crate::output::GetFieldLevelEncryptionProfileConfigOutput,
crate::error::GetFieldLevelEncryptionProfileConfigError,
> {
let generic = crate::xml_deser::parse_http_generic_error(response)
.map_err(crate::error::GetFieldLevelEncryptionProfileConfigError::unhandled)?;
let error_code = match generic.code() {
Some(code) => code,
None => {
return Err(crate::error::GetFieldLevelEncryptionProfileConfigError::unhandled(generic))
}
};
let _error_message = generic.message().map(|msg| msg.to_owned());
Err(match error_code {
"AccessDenied" => crate::error::GetFieldLevelEncryptionProfileConfigError { meta: generic, kind: crate::error::GetFieldLevelEncryptionProfileConfigErrorKind::AccessDenied({
#[allow(unused_mut)]let mut tmp =
{
#[allow(unused_mut)]let mut output = crate::error::access_denied::Builder::default();
let _ = response;
output = crate::xml_deser::deser_structure_crate_error_access_denied_xml_err(response.body().as_ref(), output).map_err(crate::error::GetFieldLevelEncryptionProfileConfigError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"NoSuchFieldLevelEncryptionProfile" => crate::error::GetFieldLevelEncryptionProfileConfigError { meta: generic, kind: crate::error::GetFieldLevelEncryptionProfileConfigErrorKind::NoSuchFieldLevelEncryptionProfile({
#[allow(unused_mut)]let mut tmp =
{
#[allow(unused_mut)]let mut output = crate::error::no_such_field_level_encryption_profile::Builder::default();
let _ = response;
output = crate::xml_deser::deser_structure_crate_error_no_such_field_level_encryption_profile_xml_err(response.body().as_ref(), output).map_err(crate::error::GetFieldLevelEncryptionProfileConfigError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
_ => crate::error::GetFieldLevelEncryptionProfileConfigError::generic(generic)
})
}
#[allow(clippy::unnecessary_wraps)]
pub fn parse_get_field_level_encryption_profile_config_response(
response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
crate::output::GetFieldLevelEncryptionProfileConfigOutput,
crate::error::GetFieldLevelEncryptionProfileConfigError,
> {
Ok({
#[allow(unused_mut)]
let mut output =
crate::output::get_field_level_encryption_profile_config_output::Builder::default();
let _ = response;
output = output.set_e_tag(
crate::http_serde::deser_header_get_field_level_encryption_profile_config_get_field_level_encryption_profile_config_output_e_tag(response.headers())
.map_err(|_|crate::error::GetFieldLevelEncryptionProfileConfigError::unhandled("Failed to parse ETag from header `ETag"))?
);
output = output.set_field_level_encryption_profile_config(
crate::http_serde::deser_payload_get_field_level_encryption_profile_config_get_field_level_encryption_profile_config_output_field_level_encryption_profile_config(response.body().as_ref())?
);
output.build()
})
}
sourcepub fn generic(err: Error) -> Self
pub fn generic(err: Error) -> Self
Creates the GetFieldLevelEncryptionProfileConfigError::Unhandled
variant from a aws_smithy_types::Error
.
Examples found in repository?
src/operation_deser.rs (line 6901)
6856 6857 6858 6859 6860 6861 6862 6863 6864 6865 6866 6867 6868 6869 6870 6871 6872 6873 6874 6875 6876 6877 6878 6879 6880 6881 6882 6883 6884 6885 6886 6887 6888 6889 6890 6891 6892 6893 6894 6895 6896 6897 6898 6899 6900 6901 6902 6903
pub fn parse_get_field_level_encryption_profile_config_error(
response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
crate::output::GetFieldLevelEncryptionProfileConfigOutput,
crate::error::GetFieldLevelEncryptionProfileConfigError,
> {
let generic = crate::xml_deser::parse_http_generic_error(response)
.map_err(crate::error::GetFieldLevelEncryptionProfileConfigError::unhandled)?;
let error_code = match generic.code() {
Some(code) => code,
None => {
return Err(crate::error::GetFieldLevelEncryptionProfileConfigError::unhandled(generic))
}
};
let _error_message = generic.message().map(|msg| msg.to_owned());
Err(match error_code {
"AccessDenied" => crate::error::GetFieldLevelEncryptionProfileConfigError { meta: generic, kind: crate::error::GetFieldLevelEncryptionProfileConfigErrorKind::AccessDenied({
#[allow(unused_mut)]let mut tmp =
{
#[allow(unused_mut)]let mut output = crate::error::access_denied::Builder::default();
let _ = response;
output = crate::xml_deser::deser_structure_crate_error_access_denied_xml_err(response.body().as_ref(), output).map_err(crate::error::GetFieldLevelEncryptionProfileConfigError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"NoSuchFieldLevelEncryptionProfile" => crate::error::GetFieldLevelEncryptionProfileConfigError { meta: generic, kind: crate::error::GetFieldLevelEncryptionProfileConfigErrorKind::NoSuchFieldLevelEncryptionProfile({
#[allow(unused_mut)]let mut tmp =
{
#[allow(unused_mut)]let mut output = crate::error::no_such_field_level_encryption_profile::Builder::default();
let _ = response;
output = crate::xml_deser::deser_structure_crate_error_no_such_field_level_encryption_profile_xml_err(response.body().as_ref(), output).map_err(crate::error::GetFieldLevelEncryptionProfileConfigError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
_ => crate::error::GetFieldLevelEncryptionProfileConfigError::generic(generic)
})
}
sourcepub fn meta(&self) -> &Error
pub fn meta(&self) -> &Error
Returns error metadata, which includes the error code, message, request ID, and potentially additional information.
sourcepub fn request_id(&self) -> Option<&str>
pub fn request_id(&self) -> Option<&str>
Returns the request ID if it’s available.
sourcepub fn is_access_denied(&self) -> bool
pub fn is_access_denied(&self) -> bool
Returns true
if the error kind is GetFieldLevelEncryptionProfileConfigErrorKind::AccessDenied
.
sourcepub fn is_no_such_field_level_encryption_profile(&self) -> bool
pub fn is_no_such_field_level_encryption_profile(&self) -> bool
Returns true
if the error kind is GetFieldLevelEncryptionProfileConfigErrorKind::NoSuchFieldLevelEncryptionProfile
.
Trait Implementations§
source§impl Error for GetFieldLevelEncryptionProfileConfigError
impl Error for GetFieldLevelEncryptionProfileConfigError
source§fn 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 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
source§impl From<GetFieldLevelEncryptionProfileConfigError> for Error
impl From<GetFieldLevelEncryptionProfileConfigError> for Error
source§fn from(err: GetFieldLevelEncryptionProfileConfigError) -> Self
fn from(err: GetFieldLevelEncryptionProfileConfigError) -> Self
Converts to this type from the input type.