garlic::ConstraintResult Struct Reference

Result of a constriant test. More...

#include <constraints.h>

Collaboration diagram for garlic::ConstraintResult:

Public Member Functions

bool is_leaf () const noexcept
 
bool is_valid () const noexcept
 
bool is_field () const noexcept
 
 operator bool () const
 

Data Fields

constraint_sequence details
 extra details/inner constraint list.
 
text name
 name of the constraint. empty if successful.
 
text reason
 reason for the failure, if any. empty if successful.
 

Detailed Description

Result of a constriant test.

Member Function Documentation

◆ is_field()

bool garlic::ConstraintResult::is_field ( ) const
inlinenoexcept
Returns
whether or not the constraint corresponds to a field/key, if so, name will be the field name.

◆ is_leaf()

bool garlic::ConstraintResult::is_leaf ( ) const
inlinenoexcept
Returns
whether or not the constraint is a leaf meaning it does not have any extra details.

◆ is_valid()

bool garlic::ConstraintResult::is_valid ( ) const
inlinenoexcept
Returns
whether or not the constraint test has passed, meaning no failure.

◆ operator bool()

garlic::ConstraintResult::operator bool ( ) const
inline

Returns
whether or not the constraint test has passed, meaning no failure.

The documentation for this struct was generated from the following file: