[][src]Struct cgroups_rs::cgroup_builder::CgroupBuilder

pub struct CgroupBuilder { /* fields omitted */ }

A control group builder instance

Implementations

impl CgroupBuilder[src]

pub fn new(name: &str) -> CgroupBuilder[src]

Start building a control group with the supplied hierarchy and name pair.

Note that this does not actually create the control group until build() is called.

pub fn memory(self) -> MemoryResourceBuilder[src]

Builds the memory resources of the control group.

pub fn pid(self) -> PidResourceBuilder[src]

Builds the pid resources of the control group.

pub fn cpu(self) -> CpuResourceBuilder[src]

Builds the cpu resources of the control group.

pub fn devices(self) -> DeviceResourceBuilder[src]

Builds the devices resources of the control group, disallowing or allowing access to certain devices in the system.

pub fn network(self) -> NetworkResourceBuilder[src]

Builds the network resources of the control group, setting class id, or various priorities on networking interfaces.

pub fn hugepages(self) -> HugepagesResourceBuilder[src]

Builds the hugepage/hugetlb resources available to the control group.

pub fn blkio(self) -> BlkIoResourcesBuilder[src]

Builds the block I/O resources available for the control group.

pub fn build(self, hier: Box<dyn Hierarchy>) -> Cgroup[src]

Finalize the control group, consuming the builder and creating the control group.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.