aws_db_esdk/deps/aws_cryptography_materialProviders/operation/
on_decrypt.rs

1// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
2// SPDX-License-Identifier: Apache-2.0
3// Do not modify this file. This file is machine generated, and any changes to it will be overwritten.
4/// Orchestration and serialization glue logic for `OnDecrypt`.
5#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
6#[non_exhaustive]
7pub struct OnDecrypt;
8impl OnDecrypt {
9    /// Creates a new `OnDecrypt`
10    pub fn new() -> Self {
11        Self
12    }
13
14    pub(crate) async fn send(
15        keyring: &crate::deps::aws_cryptography_materialProviders::types::keyring::KeyringRef,
16        input: crate::deps::aws_cryptography_materialProviders::operation::on_decrypt::OnDecryptInput,
17    ) -> ::std::result::Result<
18        crate::deps::aws_cryptography_materialProviders::operation::on_decrypt::OnDecryptOutput,
19        crate::deps::aws_cryptography_materialProviders::types::error::Error,
20    > {
21        crate::deps::aws_cryptography_materialProviders::validation::validate_aws_Pcryptography_PmaterialProviders_HOnDecryptInput_for_Keyring_OnDecrypt(&input)
22            .map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err)?;
23        keyring.inner.lock().unwrap().on_decrypt(input)
24    }
25}
26
27pub use crate::deps::aws_cryptography_materialProviders::operation::on_decrypt::_on_decrypt_output::OnDecryptOutput;
28
29pub use crate::deps::aws_cryptography_materialProviders::operation::on_decrypt::_on_decrypt_input::OnDecryptInput;
30
31pub(crate) mod _on_decrypt_output;
32
33pub(crate) mod _on_decrypt_input;
34
35/// Builders
36pub mod builders;