aws_sdk_s3/protocol_serde/
shape_get_bucket_policy_output.rs

1
2
3
4
5
6
7
8
9
10
11
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub(crate) fn de_policy_payload(
    body: &[u8],
) -> std::result::Result<::std::option::Option<::std::string::String>, crate::operation::get_bucket_policy::GetBucketPolicyError> {
    (!body.is_empty())
        .then(|| {
            let body_str = std::str::from_utf8(body).map_err(crate::operation::get_bucket_policy::GetBucketPolicyError::unhandled)?;
            Ok(body_str.to_string())
        })
        .transpose()
}