Struct oci_spec::runtime::Linux

source ·
pub struct Linux { /* private fields */ }
Expand description

Linux contains platform-specific configuration for Linux based containers.

Implementations§

source§

impl Linux

source

pub fn uid_mappings(&self) -> &Option<Vec<LinuxIdMapping>>

UIDMappings specifies user mappings for supporting user namespaces.

source

pub fn gid_mappings(&self) -> &Option<Vec<LinuxIdMapping>>

GIDMappings specifies group mappings for supporting user namespaces.

source

pub fn sysctl(&self) -> &Option<HashMap<String, String>>

Sysctl are a set of key value pairs that are set for the container on start.

source

pub fn resources(&self) -> &Option<LinuxResources>

Resources contain cgroup information for handling resource constraints for the container.

source

pub fn cgroups_path(&self) -> &Option<PathBuf>

CgroupsPath specifies the path to cgroups that are created and/or joined by the container. The path is expected to be relative to the cgroups mountpoint. If resources are specified, the cgroups at CgroupsPath will be updated based on resources.

source

pub fn namespaces(&self) -> &Option<Vec<LinuxNamespace>>

Namespaces contains the namespaces that are created and/or joined by the container.

source

pub fn devices(&self) -> &Option<Vec<LinuxDevice>>

Devices are a list of device nodes that are created for the container.

source

pub fn seccomp(&self) -> &Option<LinuxSeccomp>

Seccomp specifies the seccomp security settings for the container.

source

pub fn rootfs_propagation(&self) -> &Option<String>

RootfsPropagation is the rootfs mount propagation mode for the container.

source

pub fn masked_paths(&self) -> &Option<Vec<String>>

MaskedPaths masks over the provided paths inside the container.

source

pub fn readonly_paths(&self) -> &Option<Vec<String>>

ReadonlyPaths sets the provided paths as RO inside the container.

source

pub fn mount_label(&self) -> &Option<String>

MountLabel specifies the selinux context for the mounts in the container.

source

pub fn intel_rdt(&self) -> &Option<LinuxIntelRdt>

IntelRdt contains Intel Resource Director Technology (RDT) information for handling resource constraints and monitoring metrics (e.g., L3 cache, memory bandwidth) for the container.

source

pub fn personality(&self) -> &Option<LinuxPersonality>

Personality contains configuration for the Linux personality syscall.

source

pub fn time_offsets(&self) -> &Option<HashMap<String, String>>

TimeOffsets specifies the offset for supporting time namespaces.

source§

impl Linux

source

pub fn set_uid_mappings( &mut self, val: Option<Vec<LinuxIdMapping>> ) -> &mut Self

UIDMappings specifies user mappings for supporting user namespaces.

source

pub fn set_gid_mappings( &mut self, val: Option<Vec<LinuxIdMapping>> ) -> &mut Self

GIDMappings specifies group mappings for supporting user namespaces.

source

pub fn set_sysctl(&mut self, val: Option<HashMap<String, String>>) -> &mut Self

Sysctl are a set of key value pairs that are set for the container on start.

source

pub fn set_resources(&mut self, val: Option<LinuxResources>) -> &mut Self

Resources contain cgroup information for handling resource constraints for the container.

source

pub fn set_cgroups_path(&mut self, val: Option<PathBuf>) -> &mut Self

CgroupsPath specifies the path to cgroups that are created and/or joined by the container. The path is expected to be relative to the cgroups mountpoint. If resources are specified, the cgroups at CgroupsPath will be updated based on resources.

source

pub fn set_namespaces(&mut self, val: Option<Vec<LinuxNamespace>>) -> &mut Self

Namespaces contains the namespaces that are created and/or joined by the container.

source

pub fn set_devices(&mut self, val: Option<Vec<LinuxDevice>>) -> &mut Self

Devices are a list of device nodes that are created for the container.

source

pub fn set_seccomp(&mut self, val: Option<LinuxSeccomp>) -> &mut Self

Seccomp specifies the seccomp security settings for the container.

source

pub fn set_rootfs_propagation(&mut self, val: Option<String>) -> &mut Self

RootfsPropagation is the rootfs mount propagation mode for the container.

source

pub fn set_masked_paths(&mut self, val: Option<Vec<String>>) -> &mut Self

MaskedPaths masks over the provided paths inside the container.

source

pub fn set_readonly_paths(&mut self, val: Option<Vec<String>>) -> &mut Self

ReadonlyPaths sets the provided paths as RO inside the container.

source

pub fn set_mount_label(&mut self, val: Option<String>) -> &mut Self

MountLabel specifies the selinux context for the mounts in the container.

source

pub fn set_intel_rdt(&mut self, val: Option<LinuxIntelRdt>) -> &mut Self

IntelRdt contains Intel Resource Director Technology (RDT) information for handling resource constraints and monitoring metrics (e.g., L3 cache, memory bandwidth) for the container.

source

pub fn set_personality(&mut self, val: Option<LinuxPersonality>) -> &mut Self

Personality contains configuration for the Linux personality syscall.

source

pub fn set_time_offsets( &mut self, val: Option<HashMap<String, String>> ) -> &mut Self

TimeOffsets specifies the offset for supporting time namespaces.

source§

impl Linux

source

pub fn rootless(uid: u32, gid: u32) -> Self

Return rootless Linux configuration.

Trait Implementations§

source§

impl Clone for Linux

source§

fn clone(&self) -> Linux

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Linux

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for Linux

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for Linux

source§

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 Linux

source§

fn eq(&self, other: &Linux) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Serialize for Linux

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for Linux

source§

impl StructuralPartialEq for Linux

Auto Trait Implementations§

§

impl RefUnwindSafe for Linux

§

impl Send for Linux

§

impl Sync for Linux

§

impl Unpin for Linux

§

impl UnwindSafe for Linux

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,