From 79a35574ce6d472f7a7cc4a200a1ed7befe34066 Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Thu, 24 Sep 2026 07:59:43 +0200 Subject: doc: add API documentation --- ttwhy/core/concepts.cppm | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'ttwhy/core') diff --git a/ttwhy/core/concepts.cppm b/ttwhy/core/concepts.cppm index f7ac583..eea97e2 100644 --- a/ttwhy/core/concepts.cppm +++ b/ttwhy/core/concepts.cppm @@ -10,6 +10,9 @@ export module ttwhy.core:concepts; namespace ttwhy { + //! Validates that a candidate type implements the byte scanner interface. + //! + //! @tparam Candidate The type to validate. export template concept scanner = requires(Candidate a, std::span buffer) { { a.process(buffer) } -> std::same_as; @@ -17,11 +20,19 @@ namespace ttwhy { a.is_pending() } -> std::same_as; }; + //! Validates that a candidate type implements an asynchronous event router interface. + //! + //! @tparam Candidate The type to validate. + //! @tparam Event The type of the event to process. export template concept router = requires(Candidate candidate, Event event) { { candidate.process(event) } -> std::same_as>; }; + //! Validates that a sink type can receive an event of the given type. + //! + //! @tparam Sink The sink callable type. + //! @tparam Event The type of the event to deliver. export template concept event_sink = requires(Sink sink, Event event) { { sink(event) } -> std::same_as; -- cgit v1.2.3