| // WARNING: This file is machine generated by fidlgen. |
| |
| #include <fidl/test.protocols/cpp/common_types.h> |
| |
| namespace test_protocols { |
| extern "C" const fidl_type_t test_protocols_ErrorEnumTable; |
| } // namespace test_protocols |
| size_t fidl::internal::DisplayError<::test_protocols::ErrorEnum>::Format( |
| const ::test_protocols::ErrorEnum& value, char* destination, |
| size_t capacity) { |
| const char* name = [&]() -> const char* { |
| switch (static_cast<uint32_t>(value)) { |
| case 1u: |
| return "ERR_FOO"; |
| case 2u: |
| return "ERR_BAR"; |
| default: |
| return nullptr; |
| } |
| }(); |
| return ::fidl::internal::FormatApplicationError( |
| static_cast<uint32_t>(value), name, |
| &::test_protocols::test_protocols_ErrorEnumTable, destination, capacity); |
| } |