pub struct OrgConstraints {
pub cost_limit_monthly_usd: Option<f64>,
pub token_window_seconds: Option<i64>,
pub max_tokens_per_window: Option<i64>,
pub max_requests_per_minute: Option<i64>,
}Expand description
Org-wide spend and rate constraints. All fields are Option: None
means “no limit” — and, on
put, clears any existing limit
server-side (the gateway PUT is full-replace, so every field is always
sent).
Fields§
§cost_limit_monthly_usd: Option<f64>Hard cap (USD) on total monthly spend.
token_window_seconds: Option<i64>Sliding window for the token rate limit, in seconds.
max_tokens_per_window: Option<i64>Max tokens allowed per token_window_seconds.
max_requests_per_minute: Option<i64>Max requests per minute per API key.
Trait Implementations§
Source§impl Clone for OrgConstraints
impl Clone for OrgConstraints
Source§fn clone(&self) -> OrgConstraints
fn clone(&self) -> OrgConstraints
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 OrgConstraints
impl Debug for OrgConstraints
Source§impl Default for OrgConstraints
impl Default for OrgConstraints
Source§fn default() -> OrgConstraints
fn default() -> OrgConstraints
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for OrgConstraints
impl<'de> Deserialize<'de> for OrgConstraints
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 OrgConstraints
impl RefUnwindSafe for OrgConstraints
impl Send for OrgConstraints
impl Sync for OrgConstraints
impl Unpin for OrgConstraints
impl UnsafeUnpin for OrgConstraints
impl UnwindSafe for OrgConstraints
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