node/deps/inspector_protocol/crdtp/test_string_traits.h
Chengzhong Wu 0aa5874098 deps: move inspector_protocol to deps
The `crdtp` library in the inspector_protocol is compiled as a library
and linked to the node executable.

PR-URL: https://github.com/nodejs/node/pull/56649
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2025-01-26 23:20:09 +00:00

22 lines
640 B
C++

// Copyright 2021 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CRDTP_TEST_STRING_TRAITS_H_
#include "protocol_core.h"
namespace crdtp {
// Either real string traits or dummy string traits are going to be used
// depending on whether this is built standalone or with embedder.
template <>
struct ProtocolTypeTraits<std::string> {
static bool Deserialize(DeserializerState* state, std::string* value);
static void Serialize(const std::string& value, std::vector<uint8_t>* bytes);
};
} // namespace crdtp
#endif // CRDTP_TEST_STRING_TRAITS_H_