#include "mojo/public/cpp/system/data_pipe_utils.h"
#include <utility>
#include "base/containers/span.h"
#include "base/functional/bind.h"
#include "base/functional/callback.h"
#include "mojo/public/cpp/system/wait.h"
namespace mojo {
namespace {
bool BlockingCopyHelper(
ScopedDataPipeConsumerHandle source,
base::RepeatingCallback<size_t(base::span<const uint8_t>)> write_bytes) { … }
size_t CopyToStringHelper(std::string* result,
base::span<const uint8_t> buffer) { … }
}
bool BlockingCopyToString(ScopedDataPipeConsumerHandle source,
std::string* result) { … }
bool MOJO_CPP_SYSTEM_EXPORT
BlockingCopyFromString(const std::string& source_str,
const ScopedDataPipeProducerHandle& destination) { … }
}