pub struct OciConfig {
pub oci_version: String,
pub root: OciRoot,
pub process: OciProcess,
pub mounts: Vec<OciMount>,
pub hostname: String,
pub hooks: OciHooks,
pub linux: OciLinuxConfig,
}Expand description
Parsed OCI runtime configuration (config.json equivalent).
Fields§
§oci_version: StringOCI specification version.
root: OciRootRoot filesystem.
process: OciProcessContainer process.
mounts: Vec<OciMount>Mount points.
hostname: StringHostname.
hooks: OciHooksLifecycle hooks.
linux: OciLinuxConfigLinux-specific configuration.
Implementations§
Source§impl OciConfig
impl OciConfig
Sourcepub fn parse(input: &str) -> Result<Self, KernelError>
pub fn parse(input: &str) -> Result<Self, KernelError>
Parse a simplified config.json representation from key-value lines.
Format: one “key=value” per line. Recognized keys: oci_version, root_path, root_readonly, hostname, process_cwd, process_uid, process_gid, process_terminal, process_arg, process_env, mount (destination:type:source:options), namespace (kind[:path]), cgroups_path, memory_limit, cpu_shares, cpu_quota, cpu_period, hook_prestart, hook_poststart, hook_poststop (path:timeout)
Sourcepub fn validate(&self) -> Result<(), KernelError>
pub fn validate(&self) -> Result<(), KernelError>
Validate the configuration.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for OciConfig
impl RefUnwindSafe for OciConfig
impl Send for OciConfig
impl Sync for OciConfig
impl Unpin for OciConfig
impl UnwindSafe for OciConfig
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)