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<FoldJoin, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<FoldJoin, <__D as Deserializer<'de>>::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 moreSource§impl Serialize for FoldJoin
impl Serialize for FoldJoin
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for FoldJoin
Auto Trait Implementations§
impl Freeze for FoldJoin
impl RefUnwindSafe for FoldJoin
impl Send for FoldJoin
impl Sync for FoldJoin
impl Unpin for FoldJoin
impl UnsafeUnpin for FoldJoin
impl UnwindSafe for FoldJoin
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more