pub struct CalExecResult {
pub query: String,
pub query_hash: String,
pub result: CalResultPayload,
pub warnings: Vec<String>,
pub anonymized: Option<Value>,
pub metadata: CalMetadata,
}Expand description
Result of executing a CAL query.
Named CalExecResult (not CalResult) to avoid shadowing the
CalResult<T> type alias in errors.rs.
Fields§
§query: StringThe query string that was executed (as supplied, not normalized).
query_hash: StringSHA-256 hash of the trimmed query string (C-4 audit requirement).
result: CalResultPayloadThe result payload.
warnings: Vec<String>Non-fatal warnings emitted during parsing or execution.
anonymized: Option<Value>Anonymization egress report (proposal §4.1): present when the store has an egress policy active, carrying mode/floor and mapping ids only — the mapping itself never rides a payload (D5 custody).
metadata: CalMetadataExecution metadata.
Implementations§
Source§impl CalExecResult
impl CalExecResult
Sourcepub fn payload_json(&self) -> Result<Value>
pub fn payload_json(&self) -> Result<Value>
The wire payload every embedding surface returns: result with the
non-fatal warnings folded in under a warnings key.
Warnings used to be a field only the caller could reach, and the three
surfaces that return JSON to a user — Python, Node, and the MCP
areev_cal tool — all serialized result alone. So every CAL-Wnnn
the executor raised was dropped on the way out, and an option that
parsed but could not change the result (score_breakdown on RECALL,
CAL-W014) read as a silent no-op — the exact failure the warning
exists to make visible. warnings is omitted when empty, so a clean
query keeps the payload it always had.
Errors exactly where serializing result alone would have, so folding
the warnings in never converts a failure into a plausible-looking
payload.
Trait Implementations§
Source§impl Debug for CalExecResult
impl Debug for CalExecResult
Auto Trait Implementations§
impl Freeze for CalExecResult
impl RefUnwindSafe for CalExecResult
impl Send for CalExecResult
impl Sync for CalExecResult
impl Unpin for CalExecResult
impl UnsafeUnpin for CalExecResult
impl UnwindSafe for CalExecResult
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