pub struct CallerContext {
pub account_id: Option<String>,
pub models: Option<Vec<String>>,
pub budget: Option<u64>,
pub budget_scope: Option<BudgetScope>,
pub budget_range: Option<BudgetRange>,
pub chain: Option<String>,
}Expand description
Authenticated caller context extracted from JWT claims.
Carries the account identifier and any claim-based permissions (budget, model allowlist) through the API handler layer. Constructed in the auth filter and consumed by observers and (in the future) enforcement middleware.
Fields§
§account_id: Option<String>The account that made the request, if authentication is enabled.
models: Option<Vec<String>>Optional model-name patterns this caller may access.
budget: Option<u64>Budget limit in micro USD.
budget_scope: Option<BudgetScope>Whether the budget applies per-session or per-account.
budget_range: Option<BudgetRange>The range over which the budget is measured.
chain: Option<String>CAIP-2 chain identifier from JWT claims (e.g. "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp").
Trait Implementations§
Source§impl Clone for CallerContext
impl Clone for CallerContext
Source§fn clone(&self) -> CallerContext
fn clone(&self) -> CallerContext
Returns a duplicate of the value. Read more
1.0.0 · 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 CallerContext
impl Debug for CallerContext
Source§impl Default for CallerContext
impl Default for CallerContext
Source§fn default() -> CallerContext
fn default() -> CallerContext
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for CallerContext
impl RefUnwindSafe for CallerContext
impl Send for CallerContext
impl Sync for CallerContext
impl Unpin for CallerContext
impl UnsafeUnpin for CallerContext
impl UnwindSafe for CallerContext
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
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>
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