pub enum FoldJoin {
BestBy(String),
Last,
All,
}Expand description
How a FoldNode folds its passes into the single value it produces.
Adjacently tagged ({"kind": "...", "value": ...} for the variant that
carries data, {"kind": "..."} for the unit variants) so a future join rule
is a new variant that does not change how an existing document encodes,
exactly like BranchCondition.
The variants are grounded in what the AARG loop actually needs. best_by is
the argmax winner the loop’s “best draft wins, never the last pass” rule
requires; last and all are the two obvious simpler folds a different
consumer might want.
Variants§
BestBy(String)
Produce the pass whose value MAXIMIZES the given reference (a path into
the accumulated value, score or review.overall_score). This is the
argmax the AARG loop needs: the best draft wins, never the last. The
reference is parsed at submit like a crate::expr path, so a malformed
one is a node-precise error.
Last
Produce the value of the last pass the loop ran.
All
Produce every pass’s value as a list, in pass order.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for FoldJoin
impl<'de> Deserialize<'de> for FoldJoin
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for FoldJoin
impl JsonSchema for FoldJoin
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more