pub struct BudgetCheckResult {
pub allowed: bool,
pub current_tokens: u64,
pub max_tokens: u64,
pub current_calls: u64,
pub max_calls: u64,
pub period_start: Option<DateTime<Utc>>,
pub reason: Option<String>,
}Expand description
Result of budget check
Fields§
§allowed: boolWhether the request is allowed
current_tokens: u64Current tokens used in period
max_tokens: u64Maximum tokens allowed in period
current_calls: u64Current calls used in period
max_calls: u64Maximum calls allowed in period
period_start: Option<DateTime<Utc>>Period start timestamp
reason: Option<String>Reason if not allowed
Trait Implementations§
Source§impl Clone for BudgetCheckResult
impl Clone for BudgetCheckResult
Source§fn clone(&self) -> BudgetCheckResult
fn clone(&self) -> BudgetCheckResult
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 BudgetCheckResult
impl Debug for BudgetCheckResult
Source§impl<'de> Deserialize<'de> for BudgetCheckResult
impl<'de> Deserialize<'de> for BudgetCheckResult
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 BudgetCheckResult
impl RefUnwindSafe for BudgetCheckResult
impl Send for BudgetCheckResult
impl Sync for BudgetCheckResult
impl Unpin for BudgetCheckResult
impl UnsafeUnpin for BudgetCheckResult
impl UnwindSafe for BudgetCheckResult
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