Struct oci_spec::runtime::LinuxResourcesBuilder
source · pub struct LinuxResourcesBuilder { /* private fields */ }
Expand description
Builder for LinuxResources
.
Implementations§
source§impl LinuxResourcesBuilder
impl LinuxResourcesBuilder
sourcepub fn devices<VALUE: Into<Vec<LinuxDeviceCgroup>>>(self, value: VALUE) -> Self
pub fn devices<VALUE: Into<Vec<LinuxDeviceCgroup>>>(self, value: VALUE) -> Self
Devices configures the device allowlist.
sourcepub fn memory<VALUE: Into<LinuxMemory>>(self, value: VALUE) -> Self
pub fn memory<VALUE: Into<LinuxMemory>>(self, value: VALUE) -> Self
Memory restriction configuration.
sourcepub fn cpu<VALUE: Into<LinuxCpu>>(self, value: VALUE) -> Self
pub fn cpu<VALUE: Into<LinuxCpu>>(self, value: VALUE) -> Self
CPU resource restriction configuration.
sourcepub fn block_io<VALUE: Into<LinuxBlockIo>>(self, value: VALUE) -> Self
pub fn block_io<VALUE: Into<LinuxBlockIo>>(self, value: VALUE) -> Self
BlockIO restriction configuration.
sourcepub fn hugepage_limits<VALUE: Into<Vec<LinuxHugepageLimit>>>(
self,
value: VALUE
) -> Self
pub fn hugepage_limits<VALUE: Into<Vec<LinuxHugepageLimit>>>( self, value: VALUE ) -> Self
Hugetlb limit (in bytes).
sourcepub fn network<VALUE: Into<LinuxNetwork>>(self, value: VALUE) -> Self
pub fn network<VALUE: Into<LinuxNetwork>>(self, value: VALUE) -> Self
Network restriction configuration.
sourcepub fn rdma<VALUE: Into<HashMap<String, LinuxRdma>>>(self, value: VALUE) -> Self
pub fn rdma<VALUE: Into<HashMap<String, LinuxRdma>>>(self, value: VALUE) -> Self
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.
sourcepub fn unified<VALUE: Into<HashMap<String, String>>>(self, value: VALUE) -> Self
pub fn unified<VALUE: Into<HashMap<String, String>>>(self, value: VALUE) -> Self
Unified resources.
sourcepub fn build(self) -> Result<LinuxResources, OciSpecError>
pub fn build(self) -> Result<LinuxResources, OciSpecError>
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for LinuxResourcesBuilder
impl Send for LinuxResourcesBuilder
impl Sync for LinuxResourcesBuilder
impl Unpin for LinuxResourcesBuilder
impl UnwindSafe for LinuxResourcesBuilder
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