[][src]Struct container_spec::LinuxResourcesBuilder

pub struct LinuxResourcesBuilder { /* fields omitted */ }

Builder for LinuxResources.

Methods

impl LinuxResourcesBuilder[src]

pub fn devices<VALUE: Into<Vec<LinuxDeviceCgroup>>>(
    &mut self,
    value: VALUE
) -> &mut Self
[src]

Devices configures the device whitelist.

pub fn memory<VALUE: Into<Option<LinuxMemory>>>(
    &mut self,
    value: VALUE
) -> &mut Self
[src]

Memory restriction configuration

pub fn cpu<VALUE: Into<Option<LinuxCPU>>>(&mut self, value: VALUE) -> &mut Self[src]

CPU resource restriction configuration

pub fn pids<VALUE: Into<Option<LinuxPids>>>(
    &mut self,
    value: VALUE
) -> &mut Self
[src]

Task resource restriction configuration.

pub fn block_io<VALUE: Into<Option<LinuxBlockIO>>>(
    &mut self,
    value: VALUE
) -> &mut Self
[src]

BlockIO restriction configuration

pub fn hugepage_limits<VALUE: Into<Vec<LinuxHugepageLimit>>>(
    &mut self,
    value: VALUE
) -> &mut Self
[src]

Hugetlb limit (in bytes)

pub fn network<VALUE: Into<Option<LinuxNetwork>>>(
    &mut self,
    value: VALUE
) -> &mut Self
[src]

Network restriction configuration

pub fn rdma<VALUE: Into<HashMap<String, LinuxRdma>>>(
    &mut self,
    value: VALUE
) -> &mut Self
[src]

Rdma resource restriction configuration. Limits are a set of key value pairs that define RDMA resource limits, where the key is device name and value is resource limits.

pub fn build(&self) -> Result<LinuxResources, String>[src]

Builds a new LinuxResources.

Errors

If a required field has not been initialized.

Trait Implementations

impl Clone for LinuxResourcesBuilder[src]

impl Default for LinuxResourcesBuilder[src]

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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.