Skip to content

Commit

Permalink
serde: make has_serde_async_{read,write} more strict
Browse files Browse the repository at this point in the history
ensure that they return future<>.

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
  • Loading branch information
tchaikov committed Jul 6, 2022
1 parent 131122c commit 25c31de
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/v/serde/serde.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include "utils/named_type.h"
#include "vlog.h"

#include <seastar/core/future.hh>
#include <seastar/net/inet_address.hh>

#include <absl/container/node_hash_map.h>
Expand Down Expand Up @@ -82,12 +83,12 @@ concept has_serde_write = requires(T t, iobuf& out) {
template<typename T>
concept has_serde_async_read
= requires(T t, iobuf_parser& in, const header& h) {
t.serde_async_read(in, h);
{ t.serde_async_read(in, h) } -> seastar::Future;
};

template<typename T>
concept has_serde_async_write = requires(T t, iobuf& out) {
t.serde_async_write(out);
{ t.serde_async_write(out) } -> seastar::Future;
};

using serde_enum_serialized_t = int32_t;
Expand Down

0 comments on commit 25c31de

Please sign in to comment.