pub struct BlkIoResourcesBuilder { /* private fields */ }Expand description
A builder that configures the blkio controller of a control group.
Implementations§
Source§impl BlkIoResourcesBuilder
impl BlkIoResourcesBuilder
Sourcepub fn weight(self, weight: u16) -> Self
pub fn weight(self, weight: u16) -> Self
See the similarly named function in the respective controller.
Sourcepub fn leaf_weight(self, leaf_weight: u16) -> Self
pub fn leaf_weight(self, leaf_weight: u16) -> Self
See the similarly named function in the respective controller.
Sourcepub fn weight_device(
self,
major: u64,
minor: u64,
weight: Option<u16>,
leaf_weight: Option<u16>,
) -> BlkIoResourcesBuilder
pub fn weight_device( self, major: u64, minor: u64, weight: Option<u16>, leaf_weight: Option<u16>, ) -> BlkIoResourcesBuilder
Set the weight of a certain device.
Sourcepub fn throttle_iops(self) -> BlkIoResourcesBuilder
pub fn throttle_iops(self) -> BlkIoResourcesBuilder
Start configuring the I/O operations per second metric.
Sourcepub fn throttle_bps(self) -> BlkIoResourcesBuilder
pub fn throttle_bps(self) -> BlkIoResourcesBuilder
Start configuring the bytes per second metric.
Sourcepub fn read(self, major: u64, minor: u64, rate: u64) -> BlkIoResourcesBuilder
pub fn read(self, major: u64, minor: u64, rate: u64) -> BlkIoResourcesBuilder
Limit the read rate of the current metric for a certain device.
Sourcepub fn write(self, major: u64, minor: u64, rate: u64) -> BlkIoResourcesBuilder
pub fn write(self, major: u64, minor: u64, rate: u64) -> BlkIoResourcesBuilder
Limit the write rate of the current metric for a certain device.
Sourcepub fn done(self) -> CgroupBuilder
pub fn done(self) -> CgroupBuilder
Finish the construction of the blkio resources of a control group.
Auto Trait Implementations§
impl Freeze for BlkIoResourcesBuilder
impl RefUnwindSafe for BlkIoResourcesBuilder
impl Send for BlkIoResourcesBuilder
impl Sync for BlkIoResourcesBuilder
impl Unpin for BlkIoResourcesBuilder
impl UnwindSafe for BlkIoResourcesBuilder
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