// Copyright (c) 2025 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef MP_PROXY_TYPE_STRING_H #define MP_PROXY_TYPE_STRING_H #include namespace mp { template void CustomBuildField(TypeList, Priority<1>, InvokeContext& invoke_context, Value&& value, Output&& output) { auto result = output.init(value.size()); memcpy(result.begin(), value.data(), value.size()); } template decltype(auto) CustomReadField(TypeList, Priority<1>, InvokeContext& invoke_context, Input&& input, ReadDest&& read_dest) { auto data = input.get(); return read_dest.construct(CharCast(data.begin()), data.size()); } } // namespace mp #endif // MP_PROXY_TYPE_STRING_H