| // WARNING: This file is machine generated by fidlgen. |
| |
| #include <fidl/test.struct/cpp/type_conversions.h> |
| |
| namespace fidl { |
| namespace internal { |
| |
| ::test_struct::Simple WireNaturalConversionTraits< |
| ::test_struct::wire::Simple, |
| ::test_struct::Simple>::ToNatural(::test_struct::wire::Simple src) { |
| return ::test_struct::Simple({ |
| .f1 = WireNaturalConversionTraits<uint8_t, uint8_t>::ToNatural( |
| std::move(src.f1)), |
| .f2 = |
| WireNaturalConversionTraits<bool, bool>::ToNatural(std::move(src.f2)), |
| }); |
| } |
| ::test_struct::wire::Simple WireNaturalConversionTraits< |
| ::test_struct::wire::Simple, |
| ::test_struct::Simple>::ToWire(fidl::AnyArena& arena, |
| ::test_struct::Simple src) { |
| return ::test_struct::wire::Simple{ |
| .f1 = WireNaturalConversionTraits<uint8_t, uint8_t>::ToWire( |
| arena, std::move(src.f1())), |
| .f2 = WireNaturalConversionTraits<bool, bool>::ToWire( |
| arena, std::move(src.f2())), |
| }; |
| } |
| |
| ::test_struct::BasicStruct WireNaturalConversionTraits< |
| ::test_struct::wire::BasicStruct, |
| ::test_struct::BasicStruct>::ToNatural(::test_struct::wire::BasicStruct |
| src) { |
| return ::test_struct::BasicStruct({ |
| .x = WireNaturalConversionTraits<uint32_t, uint32_t>::ToNatural( |
| std::move(src.x)), |
| .y = WireNaturalConversionTraits< |
| ::fidl::StringView, ::std::string>::ToNatural(std::move(src.y)), |
| }); |
| } |
| ::test_struct::wire::BasicStruct WireNaturalConversionTraits< |
| ::test_struct::wire::BasicStruct, |
| ::test_struct::BasicStruct>::ToWire(fidl::AnyArena& arena, |
| ::test_struct::BasicStruct src) { |
| return ::test_struct::wire::BasicStruct{ |
| .x = WireNaturalConversionTraits<uint32_t, uint32_t>::ToWire( |
| arena, std::move(src.x())), |
| .y = WireNaturalConversionTraits< |
| ::fidl::StringView, ::std::string>::ToWire(arena, std::move(src.y())), |
| }; |
| } |
| |
| #ifdef __Fuchsia__ |
| |
| #endif // __Fuchsia__ |
| } // namespace internal |
| } // namespace fidl |