BitShares-Core  7.0.2
BitShares blockchain node software and command-line wallet software
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
graphene::protocol::predicate_result Struct Reference

A type describing the result of a restriction predicate. More...

#include <restriction_predicate.hpp>

Public Types

enum  rejection_reason { predicate_was_false, null_optional, incorrect_variant_type }
 Enumeration of the general reasons a predicate may reject. More...
 
using rejection_indicator = static_variant< size_t, vector< predicate_result >, rejection_reason >
 

Public Member Functions

 operator bool () const
 
predicate_resultreverse_path ()
 Reverse the order of the rejection path. Returns a reference to this object. More...
 

Static Public Member Functions

static predicate_result Rejection (rejection_reason reason)
 
static predicate_result Rejection (vector< predicate_result > branches)
 
static predicate_result Success ()
 

Public Attributes

bool success = false
 Whether or not the operation complied with the restrictions or not. More...
 
vector< rejection_indicatorrejection_path
 Failure indicators, ordered from the outermost restriction to the innermost (the location of the rejection) More...
 

Detailed Description

A type describing the result of a restriction predicate.

Definition at line 34 of file restriction_predicate.hpp.

Member Typedef Documentation

◆ rejection_indicator

An indicator of what rejection occurred at a particular restriction – either an index to a sub-restriction, a list of rejection results from the branches of a logical OR, or the immediate reason for rejection

Definition at line 47 of file restriction_predicate.hpp.

Member Enumeration Documentation

◆ rejection_reason

Enumeration of the general reasons a predicate may reject.

Enumerator
predicate_was_false 
null_optional 
incorrect_variant_type 

Definition at line 39 of file restriction_predicate.hpp.

Member Function Documentation

◆ operator bool()

graphene::protocol::predicate_result::operator bool ( ) const
inline

Definition at line 55 of file restriction_predicate.hpp.

◆ Rejection() [1/2]

static predicate_result graphene::protocol::predicate_result::Rejection ( rejection_reason  reason)
inlinestatic

Definition at line 51 of file restriction_predicate.hpp.

◆ Rejection() [2/2]

static predicate_result graphene::protocol::predicate_result::Rejection ( vector< predicate_result branches)
inlinestatic

Definition at line 52 of file restriction_predicate.hpp.

◆ reverse_path()

predicate_result & graphene::protocol::predicate_result::reverse_path ( )

Reverse the order of the rejection path. Returns a reference to this object.

Definition at line 72 of file restriction_predicate.cpp.

◆ Success()

static predicate_result graphene::protocol::predicate_result::Success ( )
inlinestatic

Definition at line 53 of file restriction_predicate.hpp.

Member Data Documentation

◆ rejection_path

vector<rejection_indicator> graphene::protocol::predicate_result::rejection_path

Failure indicators, ordered from the outermost restriction to the innermost (the location of the rejection)

Definition at line 49 of file restriction_predicate.hpp.

◆ success

bool graphene::protocol::predicate_result::success = false

Whether or not the operation complied with the restrictions or not.

Definition at line 36 of file restriction_predicate.hpp.


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