Struct oci_spec::runtime::LinuxResources
source · pub struct LinuxResources { /* private fields */ }
Expand description
Resource constraints for container
Implementations§
source§impl LinuxResources
impl LinuxResources
sourcepub fn devices(&self) -> &Option<Vec<LinuxDeviceCgroup>>
pub fn devices(&self) -> &Option<Vec<LinuxDeviceCgroup>>
Devices configures the device allowlist.
sourcepub fn memory(&self) -> &Option<LinuxMemory>
pub fn memory(&self) -> &Option<LinuxMemory>
Memory restriction configuration.
sourcepub fn block_io(&self) -> &Option<LinuxBlockIo>
pub fn block_io(&self) -> &Option<LinuxBlockIo>
BlockIO restriction configuration.
sourcepub fn hugepage_limits(&self) -> &Option<Vec<LinuxHugepageLimit>>
pub fn hugepage_limits(&self) -> &Option<Vec<LinuxHugepageLimit>>
Hugetlb limit (in bytes).
sourcepub fn network(&self) -> &Option<LinuxNetwork>
pub fn network(&self) -> &Option<LinuxNetwork>
Network restriction configuration.
source§impl LinuxResources
impl LinuxResources
sourcepub fn devices_mut(&mut self) -> &mut Option<Vec<LinuxDeviceCgroup>>
pub fn devices_mut(&mut self) -> &mut Option<Vec<LinuxDeviceCgroup>>
Devices configures the device allowlist.
sourcepub fn memory_mut(&mut self) -> &mut Option<LinuxMemory>
pub fn memory_mut(&mut self) -> &mut Option<LinuxMemory>
Memory restriction configuration.
sourcepub fn block_io_mut(&mut self) -> &mut Option<LinuxBlockIo>
pub fn block_io_mut(&mut self) -> &mut Option<LinuxBlockIo>
BlockIO restriction configuration.
sourcepub fn hugepage_limits_mut(&mut self) -> &mut Option<Vec<LinuxHugepageLimit>>
pub fn hugepage_limits_mut(&mut self) -> &mut Option<Vec<LinuxHugepageLimit>>
Hugetlb limit (in bytes).
sourcepub fn network_mut(&mut self) -> &mut Option<LinuxNetwork>
pub fn network_mut(&mut self) -> &mut Option<LinuxNetwork>
Network restriction configuration.
source§impl LinuxResources
impl LinuxResources
sourcepub fn set_devices(&mut self, val: Option<Vec<LinuxDeviceCgroup>>) -> &mut Self
pub fn set_devices(&mut self, val: Option<Vec<LinuxDeviceCgroup>>) -> &mut Self
Devices configures the device allowlist.
sourcepub fn set_memory(&mut self, val: Option<LinuxMemory>) -> &mut Self
pub fn set_memory(&mut self, val: Option<LinuxMemory>) -> &mut Self
Memory restriction configuration.
sourcepub fn set_cpu(&mut self, val: Option<LinuxCpu>) -> &mut Self
pub fn set_cpu(&mut self, val: Option<LinuxCpu>) -> &mut Self
CPU resource restriction configuration.
sourcepub fn set_block_io(&mut self, val: Option<LinuxBlockIo>) -> &mut Self
pub fn set_block_io(&mut self, val: Option<LinuxBlockIo>) -> &mut Self
BlockIO restriction configuration.
sourcepub fn set_hugepage_limits(
&mut self,
val: Option<Vec<LinuxHugepageLimit>>,
) -> &mut Self
pub fn set_hugepage_limits( &mut self, val: Option<Vec<LinuxHugepageLimit>>, ) -> &mut Self
Hugetlb limit (in bytes).
sourcepub fn set_network(&mut self, val: Option<LinuxNetwork>) -> &mut Self
pub fn set_network(&mut self, val: Option<LinuxNetwork>) -> &mut Self
Network restriction configuration.
Trait Implementations§
source§impl Clone for LinuxResources
impl Clone for LinuxResources
source§fn clone(&self) -> LinuxResources
fn clone(&self) -> LinuxResources
Returns a copy 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 LinuxResources
impl Debug for LinuxResources
source§impl Default for LinuxResources
impl Default for LinuxResources
source§fn default() -> LinuxResources
fn default() -> LinuxResources
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for LinuxResources
impl<'de> Deserialize<'de> for LinuxResources
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq for LinuxResources
impl PartialEq for LinuxResources
source§fn eq(&self, other: &LinuxResources) -> bool
fn eq(&self, other: &LinuxResources) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for LinuxResources
impl Serialize for LinuxResources
impl Eq for LinuxResources
impl StructuralPartialEq for LinuxResources
Auto Trait Implementations§
impl Freeze for LinuxResources
impl RefUnwindSafe for LinuxResources
impl Send for LinuxResources
impl Sync for LinuxResources
impl Unpin for LinuxResources
impl UnwindSafe for LinuxResources
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)