Skip to main content

ServiceGroupRuntime

Struct ServiceGroupRuntime 

Source
pub struct ServiceGroupRuntime { /* private fields */ }
Expand description

Native runtime settings owned by one ServiceGroup.

The group’s logical ServiceGroup::name remains distinct from an optional runtime pod name and the optional systemd service name. All settings are group-scoped; adapters must not assign them to an arbitrary member service.

Implementations§

Source§

impl ServiceGroupRuntime

Source

pub const fn new() -> Self

Creates empty group-runtime settings for incremental adapter mapping.

Source

pub fn set_runtime_name(&mut self, name: Sourced<ProtectedString>)

Sets the pod/runtime name distinct from the neutral group key.

Source

pub const fn runtime_name(&self) -> Option<&Sourced<ProtectedString>>

Returns the explicit pod/runtime name.

Source

pub fn set_service_name(&mut self, name: Sourced<ProtectedString>)

Sets the systemd service name distinct from the logical and runtime names.

Source

pub const fn service_name(&self) -> Option<&Sourced<ProtectedString>>

Returns the explicit systemd service name.

Source

pub fn set_host_mappings(&mut self, values: Vec<Sourced<HostMapping>>)

Sets pod host mappings, preserving omitted versus explicit-empty state.

Source

pub fn set_host_mappings_with_origins( &mut self, values: Vec<Sourced<HostMapping>>, origins: Vec<Provenance>, )

Sets pod host mappings with collection-level provenance.

Source

pub fn add_host_mapping(&mut self, value: Sourced<HostMapping>)

Appends one pod host mapping in source order.

Source

pub fn host_mappings(&self) -> Option<&[Sourced<HostMapping>]>

Returns pod host mappings, preserving omitted versus explicit-empty state.

Source

pub fn host_mappings_origins(&self) -> &[Provenance]

Returns collection-level pod-host-mapping provenance.

Source

pub fn set_ports(&mut self, values: Vec<Sourced<Port>>)

Sets pod ports, preserving omitted versus explicit-empty state.

Source

pub fn set_ports_with_origins( &mut self, values: Vec<Sourced<Port>>, origins: Vec<Provenance>, )

Sets pod ports with collection-level provenance.

Source

pub fn add_port(&mut self, value: Sourced<Port>)

Appends one pod port in source order.

Source

pub fn ports(&self) -> Option<&[Sourced<Port>]>

Returns pod ports, preserving omitted versus explicit-empty state.

Source

pub fn ports_origins(&self) -> &[Provenance]

Returns collection-level pod-port provenance.

Source

pub fn set_networks(&mut self, values: Vec<Sourced<NetworkAttachment>>)

Sets pod network attachments, preserving omitted versus explicit-empty state.

Source

pub fn set_networks_with_origins( &mut self, values: Vec<Sourced<NetworkAttachment>>, origins: Vec<Provenance>, )

Sets pod network attachments with collection-level provenance.

Source

pub fn add_network(&mut self, value: Sourced<NetworkAttachment>)

Appends one pod network attachment in source order.

Source

pub fn replace_network( &mut self, index: usize, value: Sourced<NetworkAttachment>, ) -> Result<Sourced<NetworkAttachment>, ModelError>

Replaces one pod network attachment without changing authored order.

§Errors

Returns ModelError::UnknownServiceGroupRuntimeNetworkIndex when index is outside the explicitly authored attachment collection.

Source

pub fn networks(&self) -> Option<&[Sourced<NetworkAttachment>]>

Returns pod network attachments, preserving omitted versus explicit-empty state.

Source

pub fn networks_origins(&self) -> &[Provenance]

Returns collection-level pod-network provenance.

Source

pub fn set_user_namespace(&mut self, value: Sourced<ProtectedString>)

Sets the raw-preserving pod user-namespace mode.

Source

pub const fn user_namespace(&self) -> Option<&Sourced<ProtectedString>>

Returns the explicit pod user-namespace mode.

Source

pub fn set_mounts(&mut self, values: Vec<Sourced<Mount>>)

Sets pod mounts, preserving omitted versus explicit-empty state.

Source

pub fn set_mounts_with_origins( &mut self, values: Vec<Sourced<Mount>>, origins: Vec<Provenance>, )

Sets pod mounts with collection-level provenance.

Source

pub fn add_mount(&mut self, value: Sourced<Mount>)

Appends one pod mount in source order.

Source

pub fn mounts(&self) -> Option<&[Sourced<Mount>]>

Returns pod mounts, preserving omitted versus explicit-empty state.

Source

pub fn mounts_origins(&self) -> &[Provenance]

Returns collection-level pod-mount provenance.

Source

pub fn set_shm_size(&mut self, value: Sourced<ProtectedString>)

Sets the raw protected pod shared-memory-size spelling.

Source

pub const fn shm_size(&self) -> Option<&Sourced<ProtectedString>>

Returns the raw protected pod shared-memory-size spelling.

Source

pub fn set_exit_policy(&mut self, value: Sourced<GroupExitPolicy>)

Sets the pod exit policy.

Source

pub const fn exit_policy(&self) -> Option<&Sourced<GroupExitPolicy>>

Returns the explicit pod exit policy.

Source

pub fn set_stop_timeout(&mut self, value: Sourced<StopTimeout>)

Sets the raw stop-grace duration for the pod.

Source

pub const fn stop_timeout(&self) -> Option<&Sourced<StopTimeout>>

Returns the explicit raw pod stop-grace duration.

Trait Implementations§

Source§

impl Clone for ServiceGroupRuntime

Source§

fn clone(&self) -> ServiceGroupRuntime

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for ServiceGroupRuntime

Source§

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

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

impl Default for ServiceGroupRuntime

Source§

fn default() -> ServiceGroupRuntime

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

impl Eq for ServiceGroupRuntime

Source§

impl PartialEq for ServiceGroupRuntime

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for ServiceGroupRuntime

Auto Trait Implementations§

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, dest: *mut u8)

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