Go to the documentation of this file.
9 #ifndef EAGINE_SERIALIZE_RESULT_HPP
10 #define EAGINE_SERIALIZE_RESULT_HPP
12 #include "../bitfield.hpp"
13 #include "../reflect/map_enumerators.hpp"
14 #include "../valid_if/indicated.hpp"
37 template <
typename Selector>
39 enumerator_mapping(type_identity<serialization_error_code>, Selector) noexcept {
40 return enumerator_map_type<serialization_error_code, 5>{
78 template <
typename Selector>
79 constexpr
auto enumerator_mapping(
80 type_identity<deserialization_error_code>,
82 return enumerator_map_type<deserialization_error_code, 11>{
112 template <
typename T>
118 template <
typename T>
121 return result.policy()._indicator;
128 template <
typename T>
134 template <
typename T>
137 return result.policy()._indicator;
142 #endif // EAGINE_SERIALIZE_RESULT_HPP
valid_if_indicated< T, deserialization_errors, bool, false > deserialization_result
Alias for result type of deserialization operations.
Definition: result.hpp:130
@ data_source_error
Internal error in the deserialization data source.
@ invalid_format
Invalid data format.
@ data_sink_error
Internal error in the serialization data sink.
Common code is placed in this namespace.
Definition: eagine.hpp:21
Primary template for conditionally valid values.
Definition: decl.hpp:49
Class for manipulating and testing a group of enumeration-based bits.
Definition: bitfield.hpp:19
deserialization_error_code
Deserialization error code bits enumeration.
Definition: result.hpp:53
serialization_error_code
Serialization error code bits enumeration.
Definition: result.hpp:24
@ incomplete_write
Incomplete write, remaining data should be written later.
@ not_enough_data
Not enough data to deserialize the value.
@ not_supported
Value type or format not supported.
@ excess_member
Superfluous data for class data member.
@ incomplete_read
Incomplete read, remaining data should be read later.
@ missing_element
Missing data for container element.
@ unexpected_data
Superfluous data in the deserialization source.
@ backend_error
Internal error in the serialization backend.
static auto get_errors(const serialization_result< T > &result) noexcept -> serialization_errors
Returns the error bitfield from a serialization result.
Definition: result.hpp:119
@ too_much_data
Too much data to fit into serialization data sink.
@ excess_element
Superfluous data for container element.
@ backend_error
Internal error in the deserialization backend.
@ missing_member
Missing data for class data member.
@ not_supported
Value type or format not supported.