aws_db_esdk/deps/aws_cryptography_materialProviders/conversions/
derivation_algorithm.rs1#[allow(dead_code)]
5pub fn to_dafny(
6 value: &crate::deps::aws_cryptography_materialProviders::types::DerivationAlgorithm,
7) -> ::dafny_runtime::Rc<
8 crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::DerivationAlgorithm,
9>{
10 ::dafny_runtime::Rc::new(match value {
11 crate::deps::aws_cryptography_materialProviders::types::DerivationAlgorithm::Hkdf(x) =>
12 crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::DerivationAlgorithm::HKDF {
13 HKDF: crate::deps::aws_cryptography_materialProviders::conversions::hkdf::to_dafny(&x.clone())
14,
15 },
16crate::deps::aws_cryptography_materialProviders::types::DerivationAlgorithm::Identity(x) =>
17 crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::DerivationAlgorithm::IDENTITY {
18 IDENTITY: crate::deps::aws_cryptography_materialProviders::conversions::identity::to_dafny(&x.clone())
19,
20 },
21crate::deps::aws_cryptography_materialProviders::types::DerivationAlgorithm::None(x) =>
22 crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::DerivationAlgorithm::None {
23 _None: crate::deps::aws_cryptography_materialProviders::conversions::none::to_dafny(&x.clone())
24,
25 },
26 _ => panic!("Unknown union variant: {:?}", value),
27 })
28}
29
30#[allow(dead_code)]
31pub fn from_dafny(
32 dafny_value: ::dafny_runtime::Rc<
33 crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::DerivationAlgorithm,
34 >,
35) -> crate::deps::aws_cryptography_materialProviders::types::DerivationAlgorithm {
36 match &::dafny_runtime::Rc::unwrap_or_clone(dafny_value) {
37 crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::DerivationAlgorithm::HKDF {
38 HKDF: x @ _,
39} => crate::deps::aws_cryptography_materialProviders::types::DerivationAlgorithm::Hkdf(crate::deps::aws_cryptography_materialProviders::conversions::hkdf::from_dafny(x.clone())
40),
41crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::DerivationAlgorithm::IDENTITY {
42 IDENTITY: x @ _,
43} => crate::deps::aws_cryptography_materialProviders::types::DerivationAlgorithm::Identity(crate::deps::aws_cryptography_materialProviders::conversions::identity::from_dafny(x.clone())
44),
45crate::r#software::amazon::cryptography::materialproviders::internaldafny::types::DerivationAlgorithm::None {
46 _None: x @ _,
47} => crate::deps::aws_cryptography_materialProviders::types::DerivationAlgorithm::None(crate::deps::aws_cryptography_materialProviders::conversions::none::from_dafny(x.clone())
48),
49 }
50}