pub struct StoreCtx<'a> {
pub tenant: TenantId,
pub scope: &'a AccessScope,
pub subject: Subject,
pub snapshot: Option<&'a ReadSnapshot>,
pub budget: RemainingBudget,
pub cancel: CancellationToken,
}Expand description
Per-call context. The compiled scope is mandatory, not optional: authorization has to reach inside the statements (a search arm applies it before ranking and LIMIT), so it cannot be a filter the gear applies to whatever the plugin returns.
scope living here rather than in a per-method argument is what makes the
request-level decline possible: an implementation inspects the compiled
scope it is about to serve and may answer ScopeUnservable instead of a
result, which the gateway resolves by falling back. It is a routing
signal, not a failure, and it never reaches the caller.
Fields§
§tenant: TenantId§scope: &'a AccessScope§subject: SubjectThe acting subject, stamped onto the audit envelope of every element a
write in this call creates, updates or tombstones (fr-audit-envelope).
snapshot: Option<&'a ReadSnapshot>Present when the call participates in a compound read that must observe one graph state (Read Consistency Contract).
budget: RemainingBudgetWhat is left of the operation’s absolute deadline.
cancel: CancellationToken