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§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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)