pub struct ContextReceiptV1 {
pub receipt_id: String,
pub task_id: String,
pub bundle_id: String,
pub budget_tokens: u64,
pub materialized_tokens: u64,
pub candidates_considered: u32,
pub candidates_selected: u32,
pub sources_used: Vec<String>,
pub degraded_reasons: Vec<String>,
}Expand description
Accounting receipt for a context-routing decision.
Fields§
§receipt_id: String§task_id: String§bundle_id: String§budget_tokens: u64§materialized_tokens: u64§candidates_considered: u32§candidates_selected: u32§sources_used: Vec<String>§degraded_reasons: Vec<String>Implementations§
Source§impl ContextReceiptV1
impl ContextReceiptV1
Sourcepub fn validate(&self) -> Result<(), ValidationError>
pub fn validate(&self) -> Result<(), ValidationError>
Validate candidate and token accounting invariants.
Trait Implementations§
Source§impl Clone for ContextReceiptV1
impl Clone for ContextReceiptV1
Source§fn clone(&self) -> ContextReceiptV1
fn clone(&self) -> ContextReceiptV1
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 moreSource§impl Debug for ContextReceiptV1
impl Debug for ContextReceiptV1
Source§impl Default for ContextReceiptV1
impl Default for ContextReceiptV1
Source§fn default() -> ContextReceiptV1
fn default() -> ContextReceiptV1
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ContextReceiptV1
impl<'de> Deserialize<'de> for ContextReceiptV1
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>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ContextReceiptV1
Source§impl PartialEq for ContextReceiptV1
impl PartialEq for ContextReceiptV1
Source§impl Serialize for ContextReceiptV1
impl Serialize for ContextReceiptV1
impl StructuralPartialEq for ContextReceiptV1
Auto Trait Implementations§
impl Freeze for ContextReceiptV1
impl RefUnwindSafe for ContextReceiptV1
impl Send for ContextReceiptV1
impl Sync for ContextReceiptV1
impl Unpin for ContextReceiptV1
impl UnsafeUnpin for ContextReceiptV1
impl UnwindSafe for ContextReceiptV1
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