aboutsummaryrefslogtreecommitdiff
path: root/src/libutil/serialise.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/libutil/serialise.hh')
-rw-r--r--src/libutil/serialise.hh6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libutil/serialise.hh b/src/libutil/serialise.hh
index a6f1c42e9..6f4f4c855 100644
--- a/src/libutil/serialise.hh
+++ b/src/libutil/serialise.hh
@@ -22,6 +22,12 @@ struct Sink
}
};
+/* Just throws away data. */
+struct NullSink : Sink
+{
+ void operator () (const unsigned char * data, size_t len) override
+ { }
+};
/* A buffered abstract sink. Warning: a BufferedSink should not be
used from multiple threads concurrently. */