Struct cgroups_rs::CpuResources [−][src]
Resources limits about how the tasks can use the CPU.
Fields
cpus: Option<String>
A comma-separated list of CPU IDs where the task in the control group can run. Dashes between numbers indicate ranges.
mems: Option<String>
Same syntax as the cpus
field of this structure, but applies to memory nodes instead of
processors.
Weight of how much of the total CPU time should this control group get. Note that this is hierarchical, so this is weighted against the siblings of this control group.
quota: Option<i64>
In one period
, how much can the tasks run in nanoseconds.
period: Option<u64>
Period of time in nanoseconds.
realtime_runtime: Option<i64>
This is currently a no-operation.
realtime_period: Option<u64>
This is currently a no-operation.
attrs: HashMap<&'static str, String>
Customized key-value attributes
Usage:
let resource = &mut cgroups_rs::Resources::default(); resource.cpu.attrs.insert("cpu.cfs_init_buffer_us", "10".to_string()); // apply here
Trait Implementations
impl Clone for CpuResources
[src]
fn clone(&self) -> CpuResources
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for CpuResources
[src]
impl Default for CpuResources
[src]
fn default() -> CpuResources
[src]
impl Eq for CpuResources
[src]
impl PartialEq<CpuResources> for CpuResources
[src]
fn eq(&self, other: &CpuResources) -> bool
[src]
fn ne(&self, other: &CpuResources) -> bool
[src]
impl StructuralEq for CpuResources
[src]
impl StructuralPartialEq for CpuResources
[src]
Auto Trait Implementations
impl RefUnwindSafe for CpuResources
impl Send for CpuResources
impl Sync for CpuResources
impl Unpin for CpuResources
impl UnwindSafe for CpuResources
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,