pub struct RateLimit {
pub bytes_per_sec: u64,
pub burst_bytes: u64,
}Expand description
Per-direction rate cap (bytes/sec). Use unlimited() to bypass.
Fields§
§bytes_per_sec: u64Refill rate (bytes per second).
burst_bytes: u64Burst — bucket size in bytes; max instantaneous draw.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RateLimit
impl RefUnwindSafe for RateLimit
impl Send for RateLimit
impl Sync for RateLimit
impl Unpin for RateLimit
impl UnsafeUnpin for RateLimit
impl UnwindSafe for RateLimit
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