morph 0.1.0
Asynchronous bridge between GUI thread and business models
Loading...
Searching...
No Matches
morph::ui::Refusal Struct Reference

Why a document, an expression or a value was refused: where, and the reason. More...

#include <value.hpp>

Public Member Functions

std::string message () const
 The refusal as one line of text.
bool operator== (Refusal const &other) const =default
 Field-wise equality.

Public Attributes

std::string document
 The id of the document refused; empty when the refusal is not about a whole document.
std::string path
 A JSON Pointer (RFC 6901) to the refused part, "" for the whole input.
std::string reason
 The reason, in one sentence.

Detailed Description

Why a document, an expression or a value was refused: where, and the reason.

Definition at line 38 of file value.hpp.

Member Function Documentation

◆ message()

std::string morph::ui::Refusal::message ( ) const
inlinenodiscard

The refusal as one line of text.

Returns
document <id> at <path>: <reason>, leaving out the parts that are empty.

Definition at line 48 of file value.hpp.

◆ operator==()

bool morph::ui::Refusal::operator== ( Refusal const & other) const
default

Field-wise equality.

Parameters
otherThe refusal to compare with.
Returns
Whether the document, path and reason are equal.

Member Data Documentation

◆ document

std::string morph::ui::Refusal::document

The id of the document refused; empty when the refusal is not about a whole document.

Definition at line 40 of file value.hpp.

◆ path

std::string morph::ui::Refusal::path

A JSON Pointer (RFC 6901) to the refused part, "" for the whole input.

Definition at line 42 of file value.hpp.

◆ reason

std::string morph::ui::Refusal::reason

The reason, in one sentence.

Definition at line 44 of file value.hpp.


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