pub struct ResolvedKey {
pub tenant_id: TenantId,
pub allowed_models: Vec<String>,
pub monthly_budget: Option<Decimal>,
pub currency: Option<String>,
pub metadata: HashMap<String, String>,
pub active: bool,
}Expand description
A resolved virtual-key record returned by KeyResolver::resolve.
Fields§
§tenant_id: TenantIdTenant this key belongs to.
allowed_models: Vec<String>Model names this key may access. Empty means unrestricted.
monthly_budget: Option<Decimal>Optional per-period spending cap.
currency: Option<String>ISO-4217 currency code for monthly_budget, e.g. "EUR".
metadata: HashMap<String, String>Arbitrary key-value metadata (e.g. "tier", "label").
active: boolWhether the key is currently active.
Trait Implementations§
Source§impl Clone for ResolvedKey
impl Clone for ResolvedKey
Source§impl Debug for ResolvedKey
impl Debug for ResolvedKey
Source§impl<'de> Deserialize<'de> for ResolvedKey
impl<'de> Deserialize<'de> for ResolvedKey
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
Auto Trait Implementations§
impl Freeze for ResolvedKey
impl RefUnwindSafe for ResolvedKey
impl Send for ResolvedKey
impl Sync for ResolvedKey
impl Unpin for ResolvedKey
impl UnsafeUnpin for ResolvedKey
impl UnwindSafe for ResolvedKey
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