Skip to content

sgns::crdt::CRDTDataFilter::ElementFilterResult

Result of a single element-filter evaluation.

#include <crdt_data_filter.hpp>

Public Types

Name
enum class Decision

Public Functions

Name
ElementFilterResult Accept()
ElementFilterResult Reject(std::vector< pb::Element > extra ={})
ElementFilterResult Stall()
ElementFilterResult FromOptional(std::optional< std::vector< pb::Element > > legacy)
Adapts the legacy optional contract: nullopt accepts, a value strips.

Public Attributes

Name
Decision decision
std::vector< pb::Element > additional_elements_to_remove
Extra elements stripped when kReject.

Public Types Documentation

enum Decision

Enumerator Value Description
kAccept Keep the element (mark seen in the work journal).
kReject Strip the element, plus any extra elements listed below.
kStall Dependencies missing locally: strip the element and re-evaluate the delta on the retry schedule.

Public Functions Documentation

function Accept

static inline ElementFilterResult Accept()

function Reject

static inline ElementFilterResult Reject(
    std::vector< pb::Element > extra ={}
)

function Stall

static inline ElementFilterResult Stall()

function FromOptional

static inline ElementFilterResult FromOptional(
    std::optional< std::vector< pb::Element > > legacy
)

Adapts the legacy optional contract: nullopt accepts, a value strips.

Public Attributes Documentation

variable decision

Decision decision = Decision::kAccept;

variable additional_elements_to_remove

std::vector< pb::Element > additional_elements_to_remove;

Extra elements stripped when kReject.


Updated on 2026-10-14 at 21:27:05 +0000