aws_db_esdk/deps/aws_cryptography_materialProviders/operation/
on_encrypt.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 `OnEncrypt`.
5#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
6#[non_exhaustive]
7pub struct OnEncrypt;
8impl OnEncrypt {
9    /// Creates a new `OnEncrypt`
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_encrypt::OnEncryptInput,
17    ) -> ::std::result::Result<
18        crate::deps::aws_cryptography_materialProviders::operation::on_encrypt::OnEncryptOutput,
19        crate::deps::aws_cryptography_materialProviders::types::error::Error,
20    > {
21        crate::deps::aws_cryptography_materialProviders::validation::validate_aws_Pcryptography_PmaterialProviders_HOnEncryptInput_for_Keyring_OnEncrypt(&input)
22            .map_err(crate::deps::aws_cryptography_materialProviders::types::error::Error::wrap_validation_err)?;
23        keyring.inner.lock().unwrap().on_encrypt(input)
24    }
25}
26
27pub use crate::deps::aws_cryptography_materialProviders::operation::on_encrypt::_on_encrypt_output::OnEncryptOutput;
28
29pub use crate::deps::aws_cryptography_materialProviders::operation::on_encrypt::_on_encrypt_input::OnEncryptInput;
30
31pub(crate) mod _on_encrypt_output;
32
33pub(crate) mod _on_encrypt_input;
34
35/// Builders
36pub mod builders;