oci_spec::runtime

Struct 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 uid_mappings_mut(&mut self) -> &mut Option<Vec<LinuxIdMapping>>

UIDMappings specifies user mappings for supporting user namespaces.

Source

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

GIDMappings specifies group mappings for supporting user namespaces.

Source

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

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

Source

pub fn resources_mut(&mut self) -> &mut Option<LinuxResources>

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

Source

pub fn cgroups_path_mut(&mut self) -> &mut 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_mut(&mut self) -> &mut Option<Vec<LinuxNamespace>>

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

Source

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

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

Source

pub fn seccomp_mut(&mut self) -> &mut Option<LinuxSeccomp>

Seccomp specifies the seccomp security settings for the container.

Source

pub fn rootfs_propagation_mut(&mut self) -> &mut Option<String>

RootfsPropagation is the rootfs mount propagation mode for the container.

Source

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

MaskedPaths masks over the provided paths inside the container.

Source

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

ReadonlyPaths sets the provided paths as RO inside the container.

Source

pub fn mount_label_mut(&mut self) -> &mut Option<String>

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

Source

pub fn intel_rdt_mut(&mut self) -> &mut 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_mut(&mut self) -> &mut Option<LinuxPersonality>

Personality contains configuration for the Linux personality syscall.

Source

pub fn time_offsets_mut(&mut self) -> &mut 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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

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 Freeze for Linux

§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. 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,

Source§

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>,

Source§

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>,

Source§

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>,