Clio  develop
The XRP Ledger API server.
Loading...
Searching...
No Matches
rpc::SomeHandlerWithTypedInput Concept Reference

Specifies what a Handler validated by the shared consteval spec must provide. More...

#include <Concepts.hpp>

Concept definition

template<typename T>
concept SomeHandlerWithTypedInput = requires(uint32_t version, boost::json::value jv) {
typename T::Input;
{ T::parseInput(jv, version) } -> std::same_as<std::expected<typename T::Input, Status>>;
{ T::spec(version) } -> std::same_as<SpecView>;
A process function that expects both some Input and a Context.
Definition Concepts.hpp:24
Specifies what a Handler validated by the shared consteval spec must provide.
Definition Concepts.hpp:45

Detailed Description

Specifies what a Handler validated by the shared consteval spec must provide.

Such a handler inherits rpc::HandlerFor<Input>, which binds the shared spec base to Clio JSON type and supplies a static parseInput (validate and deserialise in one pass) and a static spec returning a type-erased view of the spec.