pub struct RateLimits {
pub default_on_hit: Vec<String>,
pub hooks: Vec<RateLimitHook>,
pub fallback_wait_seconds: u64,
}Expand description
Rate-limit handling policy.
Fields§
§default_on_hit: Vec<String>Default hook-name chain to run on a hit. Empty means [wait].
hooks: Vec<RateLimitHook>Named hooks. Agents reference these by name in their on_rate_limit:.
fallback_wait_seconds: u64Fallback wait when the hit can’t be parsed for a reset time. Default 30 minutes.
Trait Implementations§
Source§impl Clone for RateLimits
impl Clone for RateLimits
Source§fn clone(&self) -> RateLimits
fn clone(&self) -> RateLimits
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 RateLimits
impl Debug for RateLimits
Source§impl Default for RateLimits
impl Default for RateLimits
Source§fn default() -> RateLimits
fn default() -> RateLimits
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for RateLimits
impl<'de> Deserialize<'de> for RateLimits
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 RateLimits
impl RefUnwindSafe for RateLimits
impl Send for RateLimits
impl Sync for RateLimits
impl Unpin for RateLimits
impl UnsafeUnpin for RateLimits
impl UnwindSafe for RateLimits
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