pub struct BlkIoResources {
pub weight: Option<u16>,
pub leaf_weight: Option<u16>,
pub weight_device: Vec<BlkIoDeviceResource>,
pub throttle_read_bps_device: Vec<BlkIoDeviceThrottleResource>,
pub throttle_read_iops_device: Vec<BlkIoDeviceThrottleResource>,
pub throttle_write_bps_device: Vec<BlkIoDeviceThrottleResource>,
pub throttle_write_iops_device: Vec<BlkIoDeviceThrottleResource>,
pub attrs: HashMap<String, String>,
}Expand description
General block I/O resource limits.
Fields§
§weight: Option<u16>The weight of the control group against descendant nodes.
leaf_weight: Option<u16>The weight of the control group against sibling nodes.
weight_device: Vec<BlkIoDeviceResource>For each device, a separate weight (both normal and leaf) can be provided.
throttle_read_bps_device: Vec<BlkIoDeviceThrottleResource>Throttled read bytes/second can be provided for each device.
throttle_read_iops_device: Vec<BlkIoDeviceThrottleResource>Throttled read IO operations per second can be provided for each device.
throttle_write_bps_device: Vec<BlkIoDeviceThrottleResource>Throttled written bytes/second can be provided for each device.
throttle_write_iops_device: Vec<BlkIoDeviceThrottleResource>Throttled write IO operations per second can be provided for each device.
attrs: HashMap<String, String>Customized key-value attributes
§Usage:
let resource = &mut cgroups_rs::fs::Resources::default();
resource.blkio.attrs.insert("io.cost.weight".to_string(), "10".to_string());
// apply hereTrait Implementations§
Source§impl Clone for BlkIoResources
impl Clone for BlkIoResources
Source§fn clone(&self) -> BlkIoResources
fn clone(&self) -> BlkIoResources
Returns a duplicate of the value. Read more
1.0.0 · 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 BlkIoResources
impl Debug for BlkIoResources
Source§impl Default for BlkIoResources
impl Default for BlkIoResources
Source§fn default() -> BlkIoResources
fn default() -> BlkIoResources
Returns the “default value” for a type. Read more
Source§impl PartialEq for BlkIoResources
impl PartialEq for BlkIoResources
impl Eq for BlkIoResources
impl StructuralPartialEq for BlkIoResources
Auto Trait Implementations§
impl Freeze for BlkIoResources
impl RefUnwindSafe for BlkIoResources
impl Send for BlkIoResources
impl Sync for BlkIoResources
impl Unpin for BlkIoResources
impl UnwindSafe for BlkIoResources
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