pub struct VelocityGuard { /* private fields */ }Expand description
Guard that rate-limits agent invocations using synchronous token buckets.
Buckets are keyed by (capability_id, grant_index) so different grants
within the same capability can have independent rate limits.
Implementations§
Source§impl VelocityGuard
impl VelocityGuard
Sourcepub fn new(config: VelocityConfig) -> Self
pub fn new(config: VelocityConfig) -> Self
Create a new VelocityGuard with the given configuration.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for VelocityGuard
impl RefUnwindSafe for VelocityGuard
impl Send for VelocityGuard
impl Sync for VelocityGuard
impl Unpin for VelocityGuard
impl UnsafeUnpin for VelocityGuard
impl UnwindSafe for VelocityGuard
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