Drop the AGPL license in favor of a source-available license. See the blog post [1] for details. [1] https://www.scylladb.com/2024/12/18/why-were-moving-to-a-source-available-license/
39 lines
835 B
C++
39 lines
835 B
C++
/*
|
|
* Copyright (C) 2021-present ScyllaDB
|
|
*/
|
|
|
|
/*
|
|
* SPDX-License-Identifier: LicenseRef-ScyllaDB-Source-Available-1.0
|
|
*/
|
|
|
|
#include "serializer_impl.hh"
|
|
|
|
namespace ser {
|
|
|
|
logging::logger serlog("serializer");
|
|
|
|
} // namespace ser
|
|
|
|
namespace utils {
|
|
|
|
managed_bytes_view
|
|
buffer_view_to_managed_bytes_view(ser::buffer_view<bytes_ostream::fragment_iterator> bv) {
|
|
auto impl = bv.extract_implementation();
|
|
return build_managed_bytes_view_from_internals(
|
|
impl.current,
|
|
impl.next.extract_implementation().current_chunk,
|
|
impl.size
|
|
);
|
|
}
|
|
|
|
managed_bytes_view_opt
|
|
buffer_view_to_managed_bytes_view(std::optional<ser::buffer_view<bytes_ostream::fragment_iterator>> bvo) {
|
|
if (!bvo) {
|
|
return std::nullopt;
|
|
}
|
|
return buffer_view_to_managed_bytes_view(*bvo);
|
|
}
|
|
|
|
|
|
} // namespace utils
|