pub struct Throttle {
pub write_iops: Option<NonZeroUsize>,
pub read_iops: Option<NonZeroUsize>,
pub write_throughput: Option<NonZeroUsize>,
pub read_throughput: Option<NonZeroUsize>,
pub iops_counter: IopsCounter,
}Expand description
Throttle config for the device.
Fields§
§write_iops: Option<NonZeroUsize>The maximum write iops for the device.
read_iops: Option<NonZeroUsize>The maximum read iops for the device.
write_throughput: Option<NonZeroUsize>The maximum write throughput for the device.
read_throughput: Option<NonZeroUsize>The maximum read throughput for the device.
iops_counter: IopsCounterThe iops counter for the device.
Implementations§
Source§impl Throttle
impl Throttle
Sourcepub fn with_write_iops(self, iops: usize) -> Self
pub fn with_write_iops(self, iops: usize) -> Self
Set the maximum write iops for the device.
Sourcepub fn with_read_iops(self, iops: usize) -> Self
pub fn with_read_iops(self, iops: usize) -> Self
Set the maximum read iops for the device.
Sourcepub fn with_write_throughput(self, throughput: usize) -> Self
pub fn with_write_throughput(self, throughput: usize) -> Self
Set the maximum write throughput for the device.
Sourcepub fn with_read_throughput(self, throughput: usize) -> Self
pub fn with_read_throughput(self, throughput: usize) -> Self
Set the maximum read throughput for the device.
Sourcepub fn with_iops_counter(self, counter: IopsCounter) -> Self
pub fn with_iops_counter(self, counter: IopsCounter) -> Self
Set the iops counter for the device.
Trait Implementations§
impl Eq for Throttle
impl StructuralPartialEq for Throttle
Auto Trait Implementations§
impl Freeze for Throttle
impl RefUnwindSafe for Throttle
impl Send for Throttle
impl Sync for Throttle
impl Unpin for Throttle
impl UnwindSafe for Throttle
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more