pub enum CalResultPayload {
Show 39 variants
Grains {
grains: Vec<CalGrainResult>,
total_available: Option<usize>,
},
Exists {
exists: bool,
hash: String,
},
Count {
count: usize,
},
Granted {
principal: String,
object: String,
hash: String,
},
Revoked {
principal: String,
grants_touched: usize,
},
GrantList {
grants: Vec<Value>,
},
LoopRan {
run: Value,
},
Reviewed {
hash: String,
decision: String,
},
RecApplied {
hash: String,
rollbackable: bool,
},
RecRolledBack {
hash: String,
},
Remembered {
hash: String,
},
EntityAt {
grain: Option<Value>,
axis: String,
at_ms: i64,
},
RunTrace {
run_id: String,
trace: Value,
},
RunsTouching {
hash: String,
runs: Vec<String>,
},
DerivedFrom {
hash: String,
grains: Vec<Value>,
},
Forks {
forks: Vec<Value>,
},
Merged {
hash: String,
subject: String,
relation: String,
object: String,
},
RelatedEntities {
start: String,
entities: Vec<String>,
},
NoveltyMatches {
matches: Vec<Value>,
},
History {
versions: Vec<CalVersionResult>,
},
Describe {
info: Value,
},
Explain {
plan: CalQueryPlan,
},
Batch {
results: HashMap<String, CalResultPayload>,
},
Assembled {
grains: Vec<CalGrainResult>,
sources: Vec<SourceMeta>,
total_tokens: u32,
budget_limit: Option<u32>,
progressive: bool,
total_available: Option<usize>,
},
Diff {
source_hash: String,
target_hash: String,
changes: Vec<FieldDiff>,
},
Formatted {
text: String,
format: String,
grain_count: usize,
grains: Vec<CalGrainResult>,
},
MultiFormatted {
formats: HashMap<String, String>,
grain_count: usize,
grains: Vec<CalGrainResult>,
},
Added {
hash: String,
grain_type: String,
extracted_count: Option<usize>,
extraction_warnings: Vec<String>,
},
Superseded {
old_hash: String,
new_hash: String,
},
Accumulated {
old_hash: String,
new_hash: String,
deltas: Vec<AccumulatedDelta>,
},
TemplateDefined {
name: String,
},
TemplateDropped {
name: String,
},
QueryDefined {
name: String,
},
QueryDropped {
name: String,
},
StreamAssemble {
assemble: Box<AssembleStmt>,
with_options: Vec<WithOption>,
},
Forgotten {
target: String,
count: u64,
},
Purged {
count: usize,
},
SubjectReport {
subject: String,
identity_names: Vec<String>,
grains: Vec<Value>,
},
Unsupported {
statement: String,
message: String,
},
}Expand description
The result payload, discriminated by statement type.
Variants§
Grains
Result of RECALL, SET, or ASSEMBLE operations.
Fields
grains: Vec<CalGrainResult>Exists
Result of EXISTS.
Count
Result of a | COUNT pipeline stage.
Granted
Result of GRANT (CAL 1.3 §8.15).
Revoked
Result of REVOKE.
GrantList
Result of SHOW GRANTS — one row per live grant grain.
LoopRan
Result of RUN LOOP (CAL 1.3 §8.16) — the engine’s run report.
Reviewed
Result of APPROVE/REJECT.
RecApplied
Result of APPLY.
RecRolledBack
Result of ROLLBACK.
Remembered
Result of REMEMBER — the captured Event’s hash.
EntityAt
Result of ENTITY … AT — the as-of grain, or null.
RunTrace
Result of RUN TRACE — what a run recorded and produced.
RunsTouching
Result of RUNS TOUCHING — run ids, most recent first.
DerivedFrom
Result of DERIVED FROM — reverse provenance rows.
Forks
Result of SHOW FORKS — the open forks.
Merged
Result of MERGE — the resolved head.
RelatedEntities
Result of RELATED — the reachable entities.
NoveltyMatches
Result of NOVELTY — nearest matches, most similar first.
History
Result of HISTORY OF.
Fields
versions: Vec<CalVersionResult>Describe
Result of DESCRIBE.
Explain
Result of EXPLAIN.
Fields
plan: CalQueryPlanBatch
Result of BATCH.
Fields
results: HashMap<String, CalResultPayload>Assembled
Result of a multi-source ASSEMBLE (Phase 2).
Fields
grains: Vec<CalGrainResult>Assembled grains after budget and dedup processing.
sources: Vec<SourceMeta>Per-source metadata.
Diff
Result of HISTORY <hash> DIFF <hash> — field-level differences.
Fields
Formatted
Result of single-format rendering (WI-1.1). Contains the rendered text and format name. Used when ASSEMBLE or RECALL has a single FORMAT clause.
Fields
grains: Vec<CalGrainResult>Raw grains for A2UI surface building (not serialized on the wire).
MultiFormatted
Result of multi-format rendering (CAL spec v1.0.1, Section 14.2.1). Contains multiple renderings keyed by format name.
Fields
formats: HashMap<String, String>Renderings keyed by format name (e.g. “markdown” -> “…”, “json” -> “…”).
grains: Vec<CalGrainResult>Raw grains for A2UI surface building (not serialized on the wire).
Added
Result of ADD (Tier 1).
Fields
Superseded
Result of SUPERSEDE (Tier 1).
Accumulated
Result of ACCUMULATE (Tier 1).
TemplateDefined
Result of DEFINE TEMPLATE (FR-003).
TemplateDropped
Result of DROP TEMPLATE (FR-003).
QueryDefined
Result of DEFINE QUERY.
QueryDropped
Result of DROP QUERY.
StreamAssemble
Returned for STREAM ASSEMBLE — signals the HTTP handler to use SSE (FR-004).
Fields
assemble: Box<AssembleStmt>The parsed assemble statement (to be executed by the streaming handler).
with_options: Vec<WithOption>Query-level WITH options to apply post-merge (rerank, dedup, etc.).
Forgotten
Result of FORGET <hash>, FORGET USER, or FORGET SCOPE (Tier 2).
Purged
Result of PURGE STALE (Tier 2).
SubjectReport
Result of REPORT SUBJECT — the read-only DSAR selection: the
matched identity strings and grains ({hash, type, fields}).
Unsupported
Returned for Tier 1/2 statements (S-2) or genuinely unsupported paths.
Trait Implementations§
Source§impl Debug for CalResultPayload
impl Debug for CalResultPayload
Auto Trait Implementations§
impl Freeze for CalResultPayload
impl RefUnwindSafe for CalResultPayload
impl Send for CalResultPayload
impl Sync for CalResultPayload
impl Unpin for CalResultPayload
impl UnsafeUnpin for CalResultPayload
impl UnwindSafe for CalResultPayload
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<T> ErasedDestructor for Twhere
T: 'static,
impl<T> Fruit for T
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