pub struct ReceiptQuery {Show 14 fields
pub capability_id: Option<String>,
pub tool_server: Option<String>,
pub tool_name: Option<String>,
pub outcome: Option<String>,
pub since: Option<u64>,
pub until: Option<u64>,
pub min_cost: Option<u64>,
pub max_cost: Option<u64>,
pub cost_currency: Option<String>,
pub cursor: Option<u64>,
pub limit: usize,
pub agent_subject: Option<String>,
pub tenant_filter: Option<String>,
pub read_context: Option<ReceiptReadContext>,
}Expand description
Query parameters for filtering and paginating tool receipts.
Fields§
§capability_id: Option<String>Filter by capability ID (exact match).
tool_server: Option<String>Filter by tool server name (exact match).
tool_name: Option<String>Filter by tool name (exact match).
outcome: Option<String>Filter by decision outcome (maps to decision_kind column: “allow”, “deny”, “cancelled”, “incomplete”).
since: Option<u64>Include only receipts with timestamp >= since (Unix seconds, inclusive).
until: Option<u64>Include only receipts with timestamp <= until (Unix seconds, inclusive).
min_cost: Option<u64>Include only receipts with financial cost_charged >= min_cost (minor units). Receipts without financial metadata are excluded when this filter is set.
max_cost: Option<u64>Include only receipts with financial cost_charged <= max_cost (minor units). Receipts without financial metadata are excluded when this filter is set.
cost_currency: Option<String>Currency for cost filters. Required when either cost bound is present.
cursor: Option<u64>Cursor for forward pagination: return only receipts with seq > cursor (exclusive).
limit: usizeMaximum number of receipts to return per page (capped at MAX_QUERY_LIMIT).
agent_subject: Option<String>Filter by agent subject public key (hex-encoded Ed25519). Resolved through capability_lineage JOIN – does not replay issuance logs.
tenant_filter: Option<String>Optional tenant narrowing filter. This is never authority by itself:
callers must also provide a matching explicit read_context.
read_context: Option<ReceiptReadContext>Explicit read context resolved from authenticated authority.
Implementations§
Source§impl ReceiptQuery
impl ReceiptQuery
pub fn validated_cost_currency(&self) -> Result<Option<&str>, String>
pub fn with_read_context(self, read_context: ReceiptReadContext) -> Self
pub fn local_operator_admin(self) -> Self
pub fn authenticated_tenant(self, tenant: impl Into<String>) -> Self
pub fn effective_read_scope(&self) -> Result<EffectiveReceiptReadScope, String>
Trait Implementations§
Source§impl Clone for ReceiptQuery
impl Clone for ReceiptQuery
Source§fn clone(&self) -> ReceiptQuery
fn clone(&self) -> ReceiptQuery
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ReceiptQuery
impl Debug for ReceiptQuery
Source§impl Default for ReceiptQuery
impl Default for ReceiptQuery
Source§fn default() -> ReceiptQuery
fn default() -> ReceiptQuery
Auto Trait Implementations§
impl Freeze for ReceiptQuery
impl RefUnwindSafe for ReceiptQuery
impl Send for ReceiptQuery
impl Sync for ReceiptQuery
impl Unpin for ReceiptQuery
impl UnsafeUnpin for ReceiptQuery
impl UnwindSafe for ReceiptQuery
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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