Common System 0.2.0
Common interfaces and patterns for system integration
Loading...
Searching...
No Matches
kcenon::common::concepts::Validatable Concept Referenceexport

A type that can validate its own state. More...

#include <service.h>

Concept definition

template<typename T>
concept kcenon::common::concepts::Validatable = requires(const T t) {
{ t.validate() };
}
A type that can validate its own state.
Definition service.h:241

Detailed Description

A type that can validate its own state.

A type that can validate itself.

Validatable types provide a validate() method that checks internal consistency and returns a Result indicating success or validation errors.

Example usage:

template<Validatable T>
bool is_valid(const T& obj) {
auto result = obj.validate();
return result.is_ok();
}

Definition at line 241 of file service.h.