From 7bba7176194c4d1d9c7066f8eda7a94491d924e6 Mon Sep 17 00:00:00 2001 From: Rutger Broekhoff Date: Mon, 30 Nov 2026 21:27:55 +0100 Subject: Cleanups and updates --- server/src/http_common.cppm | 79 --------------------------------------------- 1 file changed, 79 deletions(-) delete mode 100644 server/src/http_common.cppm (limited to 'server/src/http_common.cppm') diff --git a/server/src/http_common.cppm b/server/src/http_common.cppm deleted file mode 100644 index f56c92b..0000000 --- a/server/src/http_common.cppm +++ /dev/null @@ -1,79 +0,0 @@ -module; - -#include -#include - -export module routemon:http.common; - -namespace beast = boost::beast; -export namespace bhttp = beast::http; - -namespace boost::beast { - -namespace concepts { - -template -concept buffers_generator = beast::is_buffers_generator::value; - -template -concept const_buffer_sequence = beast::is_const_buffer_sequence::value; - -} // namespace concepts - -namespace http::concepts { - -template -concept fields = is_fields::value; - -template -concept body = is_body::value; - -template -concept body_reader = is_body_reader::value; - -} // namespace http::concepts - -} // namespace boost::beast - -namespace routemon::http { - -struct supported_verb -{ - enum supported_verb_t : std::uint8_t - { - options, - delete_, - get, - head, - post, - put, - }; - - supported_verb_t value; - - supported_verb(supported_verb_t value); - - static auto from(bhttp::verb v) -> std::optional; - - operator bhttp::verb() const; -}; - -export struct verb_set -{ - bool options : 1 = false; - bool delete_ : 1 = false; - bool get : 1 = false; - bool head : 1 = false; - bool post : 1 = false; - bool put : 1 = false; - - [[nodiscard]] auto with(supported_verb v) const noexcept -> verb_set; - [[nodiscard]] auto empty() const noexcept -> bool; - [[nodiscard]] auto to_string() const -> std::string; - - auto operator==(verb_set const& rhs) const noexcept -> bool = default; -}; -static_assert(sizeof(verb_set) == 1); -static_assert(alignof(verb_set) == 1); - -} // namespace routemon::http -- cgit v1.3.1