8#ifndef GRIDFORMAT_ENCODING_CONCEPTS_HPP_
9#define GRIDFORMAT_ENCODING_CONCEPTS_HPP_
15#include <gridformat/common/concepts.hpp>
16#include <gridformat/common/serialization.hpp>
18namespace GridFormat::Concepts {
25template<
typename T,
typename S>
26concept Encoder =
requires(
const T& encoder, S& stream) {
27 { encoder(stream) } -> WriterFor<std::span<const std::byte>>;
35concept Decoder =
requires(
const T& decoder,
36 std::istream& input_stream,
37 std::span<char> characters) {
38 { decoder.decode(characters) } -> std::convertible_to<std::size_t>;
39 { decoder.decode_from(input_stream, std::size_t{}) } -> std::same_as<Serialization>;