pub struct ReceiptBuilder { /* private fields */ }Expand description
Joins context balances, normalized provider usage, and model observations.
Implementations§
Source§impl ReceiptBuilder
impl ReceiptBuilder
pub fn with_plan(self, plan_id: String) -> Self
Sourcepub fn add_context_balance(self, balance: ContextBalanceV1) -> Self
pub fn add_context_balance(self, balance: ContextBalanceV1) -> Self
Adds a context balance. Multiple balances are summed component-wise.
Sourcepub fn add_provider_usage(self, usage: NormalizedUsage) -> Self
pub fn add_provider_usage(self, usage: NormalizedUsage) -> Self
Adds provider usage while preserving unknown fields in the aggregate.
pub fn add_model_invocation(self, invocation: ModelInvocation) -> Self
Sourcepub fn with_knowledge_refs(self, refs: Vec<String>) -> Self
pub fn with_knowledge_refs(self, refs: Vec<String>) -> Self
Records the authoritative knowledge objects consulted for this task.
pub fn add_decision_ref(self, ref_id: String) -> Self
Sourcepub fn add_evidence_ref(self, ref_id: String) -> Self
pub fn add_evidence_ref(self, ref_id: String) -> Self
Adds a typed digest reference without embedding the referenced payload.
Sourcepub fn build(self) -> Result<ExecutionReceiptV1>
pub fn build(self) -> Result<ExecutionReceiptV1>
Builds and hashes a deterministic ExecutionReceiptV1.
Sourcepub fn sign(receipt: &ExecutionReceiptV1) -> String
pub fn sign(receipt: &ExecutionReceiptV1) -> String
Returns the canonical BLAKE3 hash with only signature excluded.
Sourcepub fn canonical_bytes(receipt: &ExecutionReceiptV1) -> Vec<u8> ⓘ
pub fn canonical_bytes(receipt: &ExecutionReceiptV1) -> Vec<u8> ⓘ
Exposes canonical signing bytes for offline verifiers and tests.
Trait Implementations§
Source§impl Clone for ReceiptBuilder
impl Clone for ReceiptBuilder
Source§fn clone(&self) -> ReceiptBuilder
fn clone(&self) -> ReceiptBuilder
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ReceiptBuilder
impl RefUnwindSafe for ReceiptBuilder
impl Send for ReceiptBuilder
impl Sync for ReceiptBuilder
impl Unpin for ReceiptBuilder
impl UnsafeUnpin for ReceiptBuilder
impl UnwindSafe for ReceiptBuilder
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
Mutably borrows from an owned value. Read more
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<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> ⓘ
Converts
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> ⓘ
Converts
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