aws_db_esdk/deps/aws_cryptography_materialProviders/conversions/
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#[allow(dead_code)]
5pub fn to_dafny(
6    value: &crate::deps::aws_cryptography_materialProviders::types::Encrypt,
7) -> ::dafny_runtime::Rc<
8    crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::Encrypt,
9> {
10    ::dafny_runtime::Rc::new(match value {
11        crate::deps::aws_cryptography_materialProviders::types::Encrypt::AesGcm(x) =>
12    crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::Encrypt::AES_GCM {
13        AES_GCM: crate::deps::aws_cryptography_primitives::conversions::aes_gcm::to_dafny(&x.clone())
14,
15    },
16        _ => panic!("Unknown union variant: {:?}", value),
17    })
18}
19
20#[allow(dead_code)]
21pub fn from_dafny(
22    dafny_value: ::dafny_runtime::Rc<
23        crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::Encrypt,
24    >,
25) -> crate::deps::aws_cryptography_materialProviders::types::Encrypt {
26    match &::dafny_runtime::Rc::unwrap_or_clone(dafny_value) {
27        crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::Encrypt::AES_GCM {
28    AES_GCM: x @ _,
29} => crate::deps::aws_cryptography_materialProviders::types::Encrypt::AesGcm(crate::deps::aws_cryptography_primitives::conversions::aes_gcm::from_dafny(x.clone())
30),
31    }
32}