pub struct RateLimiter {
pub bandwidth: Option<TokenBucket>,
pub ops: Option<TokenBucket>,
}Expand description
Firecracker RateLimiter config, applicable to drives and network interfaces.
At least one of bandwidth / ops should be set; setting both is allowed.
See https://github.com/firecracker-microvm/firecracker/blob/main/docs/api_requests/patch-rate-limiter.md.
Fields§
§bandwidth: Option<TokenBucket>Bandwidth token bucket (units = bytes).
ops: Option<TokenBucket>Operations token bucket (units = IO ops).
Trait Implementations§
Source§impl Clone for RateLimiter
impl Clone for RateLimiter
Source§fn clone(&self) -> RateLimiter
fn clone(&self) -> RateLimiter
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 RateLimiter
impl Debug for RateLimiter
Source§impl Default for RateLimiter
impl Default for RateLimiter
Source§fn default() -> RateLimiter
fn default() -> RateLimiter
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for RateLimiter
impl RefUnwindSafe for RateLimiter
impl Send for RateLimiter
impl Sync for RateLimiter
impl Unpin for RateLimiter
impl UnsafeUnpin for RateLimiter
impl UnwindSafe for RateLimiter
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