In these changes, we describe the purpose of the type and make it reusable for other parts of the code. That includes ditching the existing constructors, leaving the formatting of its fields to the user of the interface. The removed constructors have been replaced by free functions so that existing code can still use them the way it did before.
21 lines
431 B
C++
21 lines
431 B
C++
/*
|
|
* Copyright (C) 2024-present ScyllaDB
|
|
*/
|
|
|
|
/*
|
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <seastar/core/sstring.hh>
|
|
|
|
#include "utils/mutable_view.hh"
|
|
|
|
using namespace seastar;
|
|
|
|
using bytes = basic_sstring<int8_t, uint32_t, 31, false>;
|
|
using bytes_view = std::basic_string_view<int8_t>;
|
|
using bytes_mutable_view = basic_mutable_view<bytes_view::value_type>;
|
|
using bytes_opt = std::optional<bytes>;
|