#ifndef MOJO_PUBLIC_CPP_BINDINGS_LIB_SERIALIZATION_UTIL_H_
#define MOJO_PUBLIC_CPP_BINDINGS_LIB_SERIALIZATION_UTIL_H_
#include <stddef.h>
#include <type_traits>
#include <utility>
#include "mojo/public/cpp/bindings/lib/bindings_internal.h"
#include "mojo/public/cpp/bindings/lib/serialization_forward.h"
#include "mojo/public/cpp/bindings/lib/template_util.h"
namespace mojo {
namespace internal {
template <typename T, typename U, typename SFINAE = void>
struct HasIsNullMethod : std::false_type { … };
HasIsNullMethod<T, U, std::void_t<decltype(T::IsNull(std::declval<const U &>()))>>;
template <typename Traits, typename UserType>
bool CallIsNullIfExists(const UserType& input) { … }
template <typename T, typename U, typename SFINAE = void>
struct HasSetToNullMethod : std::false_type { … };
HasSetToNullMethod<T, U, std::void_t<decltype(T::SetToNull(std::declval<U *>()))>>;
template <typename Traits, typename UserType>
bool CallSetToNullIfExists(UserType* output) { … }
template <typename MojomType, typename UserType, typename = void>
struct TraitsFinder { … };
TraitsFinder<MojomType, UserType, std::enable_if_t<BelongsTo<MojomType, MojomTypeCategory::kUnion>::value>>;
TraitsFinder<StringDataView, UserType>;
TraitsFinder<ArrayDataView<ElementType>, UserType>;
TraitsFinder<MapDataView<KeyType, ValueType>, UserType>;
template <typename MojomType, typename UserType>
constexpr bool IsValidUserTypeForOptionalValue() { … }
template <typename T, typename U, typename SFINAE = void>
struct HasGetBeginMethod : std::false_type { … };
HasGetBeginMethod<T, U, std::void_t<decltype(T::GetBegin(std::declval<U &>()))>>;
template <typename T, typename U, typename SFINAE = void>
struct HasGetDataMethod : std::false_type { … };
HasGetDataMethod<T, U, std::void_t<decltype(& T::GetData(std::declval<U &>()))>>;
}
}
#endif