pub struct Service { /* private fields */ }Expand description
One application service with ordered attachments and source provenance.
Implementations§
Source§impl Service
impl Service
Sourcepub const fn new(name: Identifier) -> Self
pub const fn new(name: Identifier) -> Self
Creates an empty service shell for incremental adapter mapping.
Sourcepub const fn name(&self) -> &Identifier
pub const fn name(&self) -> &Identifier
Returns the service name.
Sourcepub fn set_runtime_name(&mut self, name: Sourced<ProtectedString>)
pub fn set_runtime_name(&mut self, name: Sourced<ProtectedString>)
Sets an explicit provider/runtime-level container name distinct from the service key.
Sourcepub const fn runtime_name(&self) -> Option<&Sourced<ProtectedString>>
pub const fn runtime_name(&self) -> Option<&Sourced<ProtectedString>>
Returns the explicit provider/runtime-level container name.
Sourcepub fn set_rootfs(
&mut self,
rootfs: Sourced<ProtectedString>,
) -> Result<(), ModelError>
pub fn set_rootfs( &mut self, rootfs: Sourced<ProtectedString>, ) -> Result<(), ModelError>
Sets a protected root-filesystem path instead of an image source.
§Errors
Returns ModelError::RootfsImageSourceConflict when this service already has an image,
image acquisition, or image build reference.
Sourcepub const fn rootfs(&self) -> Option<&Sourced<ProtectedString>>
pub const fn rootfs(&self) -> Option<&Sourced<ProtectedString>>
Returns the protected root-filesystem path, if explicitly authored.
Sourcepub fn set_image(&mut self, image: Sourced<ImageReference>)
pub fn set_image(&mut self, image: Sourced<ImageReference>)
Sets the optional image reference.
Sourcepub const fn image(&self) -> Option<&Sourced<ImageReference>>
pub const fn image(&self) -> Option<&Sourced<ImageReference>>
Returns the optional image reference.
Sourcepub fn set_image_acquisition(&mut self, acquisition: Sourced<Identifier>)
pub fn set_image_acquisition(&mut self, acquisition: Sourced<Identifier>)
References a separately declared image-acquisition resource.
This does not replace Self::image, which remains the runtime container image reference.
Sourcepub const fn image_acquisition(&self) -> Option<&Sourced<Identifier>>
pub const fn image_acquisition(&self) -> Option<&Sourced<Identifier>>
Returns the separately declared image-acquisition resource reference.
Sourcepub fn set_image_build(&mut self, build: Sourced<Identifier>)
pub fn set_image_build(&mut self, build: Sourced<Identifier>)
References a separately declared image-build resource.
This does not replace Self::image or any container runtime settings.
Sourcepub const fn image_build(&self) -> Option<&Sourced<Identifier>>
pub const fn image_build(&self) -> Option<&Sourced<Identifier>>
Returns the separately declared image-build resource reference.
Sourcepub fn set_command(&mut self, command: Sourced<Command>)
pub fn set_command(&mut self, command: Sourced<Command>)
Sets the command override.
Sourcepub fn set_startup_notification(
&mut self,
notification: Sourced<StartupNotification>,
)
pub fn set_startup_notification( &mut self, notification: Sourced<StartupNotification>, )
Sets the source-authored startup-notification behavior.
Sourcepub const fn startup_notification(
&self,
) -> Option<&Sourced<StartupNotification>>
pub const fn startup_notification( &self, ) -> Option<&Sourced<StartupNotification>>
Returns the explicit startup-notification behavior.
Sourcepub fn set_entrypoint(&mut self, entrypoint: Sourced<Entrypoint>)
pub fn set_entrypoint(&mut self, entrypoint: Sourced<Entrypoint>)
Sets the entrypoint override independently from the command override.
Sourcepub const fn entrypoint(&self) -> Option<&Sourced<Entrypoint>>
pub const fn entrypoint(&self) -> Option<&Sourced<Entrypoint>>
Returns the optional entrypoint override.
Sourcepub fn set_run_init(&mut self, run_init: Sourced<bool>)
pub fn set_run_init(&mut self, run_init: Sourced<bool>)
Sets whether the runtime should run its init process.
Sourcepub const fn run_init(&self) -> Option<&Sourced<bool>>
pub const fn run_init(&self) -> Option<&Sourced<bool>>
Returns the explicit init-process choice.
Sourcepub fn set_stop_timeout(&mut self, timeout: Sourced<StopTimeout>)
pub fn set_stop_timeout(&mut self, timeout: Sourced<StopTimeout>)
Sets the raw stop-grace duration.
Sourcepub const fn stop_timeout(&self) -> Option<&Sourced<StopTimeout>>
pub const fn stop_timeout(&self) -> Option<&Sourced<StopTimeout>>
Returns the explicit raw stop-grace duration.
Sourcepub fn set_pull_policy(&mut self, policy: Sourced<PullPolicy>)
pub fn set_pull_policy(&mut self, policy: Sourced<PullPolicy>)
Sets the source-independent image pull intent.
Sourcepub const fn pull_policy(&self) -> Option<&Sourced<PullPolicy>>
pub const fn pull_policy(&self) -> Option<&Sourced<PullPolicy>>
Returns the explicit image pull intent.
Sourcepub fn set_memory_limit(&mut self, limit: Sourced<ProtectedString>)
pub fn set_memory_limit(&mut self, limit: Sourced<ProtectedString>)
Sets the raw protected memory-limit spelling.
Sourcepub const fn memory_limit(&self) -> Option<&Sourced<ProtectedString>>
pub const fn memory_limit(&self) -> Option<&Sourced<ProtectedString>>
Returns the raw protected memory-limit spelling.
Sourcepub fn set_exposed_ports(&mut self, ports: Vec<Sourced<ExposedPort>>)
pub fn set_exposed_ports(&mut self, ports: Vec<Sourced<ExposedPort>>)
Sets exposed container ports, preserving omission separately from an explicit empty list.
Sourcepub fn set_exposed_ports_with_origins(
&mut self,
ports: Vec<Sourced<ExposedPort>>,
origins: Vec<Provenance>,
)
pub fn set_exposed_ports_with_origins( &mut self, ports: Vec<Sourced<ExposedPort>>, origins: Vec<Provenance>, )
Sets exposed container ports and collection-level provenance.
Sourcepub fn add_exposed_port(&mut self, port: Sourced<ExposedPort>)
pub fn add_exposed_port(&mut self, port: Sourced<ExposedPort>)
Appends one exposed container port without publishing it to a host.
Sourcepub fn exposed_ports(&self) -> Option<&[Sourced<ExposedPort>]>
pub fn exposed_ports(&self) -> Option<&[Sourced<ExposedPort>]>
Returns exposed container ports in authored order, preserving omitted versus explicit-empty state.
Sourcepub fn exposed_ports_origins(&self) -> &[Provenance]
pub fn exposed_ports_origins(&self) -> &[Provenance]
Returns collection-level exposed-port provenance.
Sourcepub fn set_restart_policy(&mut self, restart_policy: Sourced<RestartPolicy>)
pub fn set_restart_policy(&mut self, restart_policy: Sourced<RestartPolicy>)
Sets the container-level automatic restart policy.
Sourcepub const fn restart_policy(&self) -> Option<&Sourced<RestartPolicy>>
pub const fn restart_policy(&self) -> Option<&Sourced<RestartPolicy>>
Returns the container-level automatic restart policy.
Sourcepub fn set_healthcheck(&mut self, healthcheck: Sourced<Healthcheck>)
pub fn set_healthcheck(&mut self, healthcheck: Sourced<Healthcheck>)
Sets the service health-check definition.
Sourcepub const fn healthcheck(&self) -> Option<&Sourced<Healthcheck>>
pub const fn healthcheck(&self) -> Option<&Sourced<Healthcheck>>
Returns the optional service health-check definition.
Sourcepub fn add_label(&mut self, label: Sourced<MetadataLabel>)
pub fn add_label(&mut self, label: Sourced<MetadataLabel>)
Appends one service metadata label while preserving source order and provenance.
Sourcepub fn labels(&self) -> &[Sourced<MetadataLabel>]
pub fn labels(&self) -> &[Sourced<MetadataLabel>]
Returns service metadata labels in source order.
Sourcepub fn set_annotations(&mut self, annotations: Vec<Sourced<Annotation>>)
pub fn set_annotations(&mut self, annotations: Vec<Sourced<Annotation>>)
Sets repeatable annotations while preserving omission separately from an explicit empty list.
Sourcepub fn add_annotation(&mut self, annotation: Sourced<Annotation>)
pub fn add_annotation(&mut self, annotation: Sourced<Annotation>)
Appends one annotation in source order.
Sourcepub fn set_annotations_with_origins(
&mut self,
annotations: Vec<Sourced<Annotation>>,
origins: Vec<Provenance>,
)
pub fn set_annotations_with_origins( &mut self, annotations: Vec<Sourced<Annotation>>, origins: Vec<Provenance>, )
Sets repeatable annotations with collection-level provenance.
Sourcepub fn annotations(&self) -> Option<&[Sourced<Annotation>]>
pub fn annotations(&self) -> Option<&[Sourced<Annotation>]>
Returns annotations, preserving omitted versus explicit-empty state.
Sourcepub fn annotations_origins(&self) -> &[Provenance]
pub fn annotations_origins(&self) -> &[Provenance]
Returns collection-level annotation provenance.
Sourcepub fn set_logging(&mut self, logging: Sourced<Logging>)
pub fn set_logging(&mut self, logging: Sourced<Logging>)
Sets provider-specific logging intent.
Sourcepub const fn logging(&self) -> Option<&Sourced<Logging>>
pub const fn logging(&self) -> Option<&Sourced<Logging>>
Returns provider-specific logging intent.
Sourcepub fn set_reload_action(&mut self, reload_action: Sourced<ReloadAction>)
pub fn set_reload_action(&mut self, reload_action: Sourced<ReloadAction>)
Sets the mutually exclusive reload action.
Sourcepub const fn reload_action(&self) -> Option<&Sourced<ReloadAction>>
pub const fn reload_action(&self) -> Option<&Sourced<ReloadAction>>
Returns the one explicit reload action, if any.
Sourcepub fn set_user(&mut self, user: Sourced<ProtectedString>)
pub fn set_user(&mut self, user: Sourced<ProtectedString>)
Sets the primary identity used inside the service container.
Sourcepub const fn user(&self) -> Option<&Sourced<ProtectedString>>
pub const fn user(&self) -> Option<&Sourced<ProtectedString>>
Returns the primary identity used inside the service container.
Sourcepub fn set_group(&mut self, group: Sourced<ProtectedString>)
pub fn set_group(&mut self, group: Sourced<ProtectedString>)
Sets the primary group used inside the service container.
Sourcepub const fn group(&self) -> Option<&Sourced<ProtectedString>>
pub const fn group(&self) -> Option<&Sourced<ProtectedString>>
Returns the primary group used inside the service container.
Sourcepub fn set_user_namespace(&mut self, user_namespace: Sourced<ProtectedString>)
pub fn set_user_namespace(&mut self, user_namespace: Sourced<ProtectedString>)
Sets the requested user-namespace mode without imposing one runtime’s grammar.
Sourcepub const fn user_namespace(&self) -> Option<&Sourced<ProtectedString>>
pub const fn user_namespace(&self) -> Option<&Sourced<ProtectedString>>
Returns the raw-preserving user-namespace mode.
Sourcepub fn add_supplementary_group(&mut self, group: Sourced<ProtectedString>)
pub fn add_supplementary_group(&mut self, group: Sourced<ProtectedString>)
Appends one supplementary group in source order.
Sourcepub fn supplementary_groups(&self) -> &[Sourced<ProtectedString>]
pub fn supplementary_groups(&self) -> &[Sourced<ProtectedString>]
Returns supplementary groups in source order.
Sourcepub fn set_working_directory(
&mut self,
working_directory: Sourced<ProtectedString>,
)
pub fn set_working_directory( &mut self, working_directory: Sourced<ProtectedString>, )
Sets the working directory inside the service container.
Sourcepub const fn working_directory(&self) -> Option<&Sourced<ProtectedString>>
pub const fn working_directory(&self) -> Option<&Sourced<ProtectedString>>
Returns the working directory inside the service container.
Sourcepub fn set_read_only_root_filesystem(&mut self, read_only: Sourced<bool>)
pub fn set_read_only_root_filesystem(&mut self, read_only: Sourced<bool>)
Sets the explicit read-only root-filesystem choice.
Sourcepub const fn read_only_root_filesystem(&self) -> Option<&Sourced<bool>>
pub const fn read_only_root_filesystem(&self) -> Option<&Sourced<bool>>
Returns the explicit read-only root-filesystem choice.
Sourcepub fn set_hostname(&mut self, hostname: Sourced<ProtectedString>)
pub fn set_hostname(&mut self, hostname: Sourced<ProtectedString>)
Sets the explicit container hostname without inferring namespace ownership.
Sourcepub const fn hostname(&self) -> Option<&Sourced<ProtectedString>>
pub const fn hostname(&self) -> Option<&Sourced<ProtectedString>>
Returns the raw-preserving explicit hostname.
Sourcepub fn set_dns_servers_with_origins(
&mut self,
values: Vec<Sourced<ProtectedString>>,
origins: Vec<Provenance>,
)
pub fn set_dns_servers_with_origins( &mut self, values: Vec<Sourced<ProtectedString>>, origins: Vec<Provenance>, )
Sets ordered DNS servers, preserving omission separately from an explicit empty list.
Sourcepub fn set_dns_servers(&mut self, values: Vec<Sourced<ProtectedString>>)
pub fn set_dns_servers(&mut self, values: Vec<Sourced<ProtectedString>>)
Sets ordered DNS servers without separate collection provenance.
Sourcepub fn dns_servers(&self) -> Option<&[Sourced<ProtectedString>]>
pub fn dns_servers(&self) -> Option<&[Sourced<ProtectedString>]>
Returns ordered DNS servers when explicitly authored.
Sourcepub fn dns_servers_origins(&self) -> &[Provenance]
pub fn dns_servers_origins(&self) -> &[Provenance]
Returns collection provenance for explicitly authored DNS servers.
Sourcepub fn set_dns_options_with_origins(
&mut self,
values: Vec<Sourced<ProtectedString>>,
origins: Vec<Provenance>,
)
pub fn set_dns_options_with_origins( &mut self, values: Vec<Sourced<ProtectedString>>, origins: Vec<Provenance>, )
Sets ordered DNS resolver options, preserving omission separately from an explicit empty list.
Sourcepub fn set_dns_options(&mut self, values: Vec<Sourced<ProtectedString>>)
pub fn set_dns_options(&mut self, values: Vec<Sourced<ProtectedString>>)
Sets ordered DNS resolver options without separate collection provenance.
Sourcepub fn dns_options(&self) -> Option<&[Sourced<ProtectedString>]>
pub fn dns_options(&self) -> Option<&[Sourced<ProtectedString>]>
Returns ordered DNS resolver options when explicitly authored.
Sourcepub fn dns_options_origins(&self) -> &[Provenance]
pub fn dns_options_origins(&self) -> &[Provenance]
Returns collection provenance for explicitly authored DNS resolver options.
Sourcepub fn set_dns_search_domains_with_origins(
&mut self,
values: Vec<Sourced<ProtectedString>>,
origins: Vec<Provenance>,
)
pub fn set_dns_search_domains_with_origins( &mut self, values: Vec<Sourced<ProtectedString>>, origins: Vec<Provenance>, )
Sets ordered DNS search domains, preserving omission separately from an explicit empty list.
Sourcepub fn set_dns_search_domains(&mut self, values: Vec<Sourced<ProtectedString>>)
pub fn set_dns_search_domains(&mut self, values: Vec<Sourced<ProtectedString>>)
Sets ordered DNS search domains without separate collection provenance.
Sourcepub fn dns_search_domains(&self) -> Option<&[Sourced<ProtectedString>]>
pub fn dns_search_domains(&self) -> Option<&[Sourced<ProtectedString>]>
Returns ordered DNS search domains when explicitly authored.
Sourcepub fn dns_search_domains_origins(&self) -> &[Provenance]
pub fn dns_search_domains_origins(&self) -> &[Provenance]
Returns collection provenance for explicitly authored DNS search domains.
Sourcepub fn set_security_options_with_origins(
&mut self,
values: Vec<Sourced<SecurityOption>>,
origins: Vec<Provenance>,
)
pub fn set_security_options_with_origins( &mut self, values: Vec<Sourced<SecurityOption>>, origins: Vec<Provenance>, )
Sets ordered security options, preserving omission separately from an explicit empty list.
Sourcepub fn set_security_options(&mut self, values: Vec<Sourced<SecurityOption>>)
pub fn set_security_options(&mut self, values: Vec<Sourced<SecurityOption>>)
Sets ordered security options without separate collection provenance.
Sourcepub fn security_options(&self) -> Option<&[Sourced<SecurityOption>]>
pub fn security_options(&self) -> Option<&[Sourced<SecurityOption>]>
Returns ordered security options when explicitly authored.
Sourcepub fn security_options_origins(&self) -> &[Provenance]
pub fn security_options_origins(&self) -> &[Provenance]
Returns collection provenance for explicitly authored security options.
Sourcepub fn set_pids_limit(&mut self, limit: Sourced<ProtectedString>)
pub fn set_pids_limit(&mut self, limit: Sourced<ProtectedString>)
Sets the raw process-ID limit spelling.
Sourcepub const fn pids_limit(&self) -> Option<&Sourced<ProtectedString>>
pub const fn pids_limit(&self) -> Option<&Sourced<ProtectedString>>
Returns the raw process-ID limit spelling.
Sourcepub fn set_shm_size(&mut self, size: Sourced<ProtectedString>)
pub fn set_shm_size(&mut self, size: Sourced<ProtectedString>)
Sets the raw shared-memory size spelling.
Sourcepub const fn shm_size(&self) -> Option<&Sourced<ProtectedString>>
pub const fn shm_size(&self) -> Option<&Sourced<ProtectedString>>
Returns the raw shared-memory size spelling.
Sourcepub fn set_cap_add(&mut self, values: Vec<Sourced<ProtectedString>>)
pub fn set_cap_add(&mut self, values: Vec<Sourced<ProtectedString>>)
Sets the complete ordered capability-add collection; Some([]) retains an explicit reset.
Sourcepub fn set_cap_add_with_origins(
&mut self,
values: Vec<Sourced<ProtectedString>>,
origins: Vec<Provenance>,
)
pub fn set_cap_add_with_origins( &mut self, values: Vec<Sourced<ProtectedString>>, origins: Vec<Provenance>, )
Sets capability additions with collection-level provenance for an explicit empty/reset value.
Sourcepub fn cap_add(&self) -> Option<&[Sourced<ProtectedString>]>
pub fn cap_add(&self) -> Option<&[Sourced<ProtectedString>]>
Returns capability additions, preserving omitted versus explicit-empty state.
Sourcepub fn cap_add_origins(&self) -> &[Provenance]
pub fn cap_add_origins(&self) -> &[Provenance]
Returns the collection-level capability-add provenance.
Sourcepub fn set_cap_drop(&mut self, values: Vec<Sourced<ProtectedString>>)
pub fn set_cap_drop(&mut self, values: Vec<Sourced<ProtectedString>>)
Sets the complete ordered capability-drop collection; Some([]) retains an explicit reset.
Sourcepub fn set_cap_drop_with_origins(
&mut self,
values: Vec<Sourced<ProtectedString>>,
origins: Vec<Provenance>,
)
pub fn set_cap_drop_with_origins( &mut self, values: Vec<Sourced<ProtectedString>>, origins: Vec<Provenance>, )
Sets capability removals with collection-level provenance for an explicit empty/reset value.
Sourcepub fn cap_drop(&self) -> Option<&[Sourced<ProtectedString>]>
pub fn cap_drop(&self) -> Option<&[Sourced<ProtectedString>]>
Returns capability removals, preserving omitted versus explicit-empty state.
Sourcepub fn cap_drop_origins(&self) -> &[Provenance]
pub fn cap_drop_origins(&self) -> &[Provenance]
Returns the collection-level capability-drop provenance.
Sourcepub fn set_tmpfs(&mut self, values: Vec<Sourced<ProtectedString>>)
pub fn set_tmpfs(&mut self, values: Vec<Sourced<ProtectedString>>)
Sets ordered raw temporary-filesystem declarations.
Sourcepub fn set_tmpfs_with_origins(
&mut self,
values: Vec<Sourced<ProtectedString>>,
origins: Vec<Provenance>,
)
pub fn set_tmpfs_with_origins( &mut self, values: Vec<Sourced<ProtectedString>>, origins: Vec<Provenance>, )
Sets temporary filesystems with collection-level provenance.
Sourcepub fn tmpfs(&self) -> Option<&[Sourced<ProtectedString>]>
pub fn tmpfs(&self) -> Option<&[Sourced<ProtectedString>]>
Returns temporary-filesystem declarations, preserving explicit-empty state.
Sourcepub fn tmpfs_origins(&self) -> &[Provenance]
pub fn tmpfs_origins(&self) -> &[Provenance]
Returns collection-level temporary-filesystem provenance.
Sourcepub fn set_sysctls(&mut self, values: Vec<Sourced<KernelParameter>>)
pub fn set_sysctls(&mut self, values: Vec<Sourced<KernelParameter>>)
Sets ordered raw kernel-parameter assignments.
Sourcepub fn set_sysctls_with_origins(
&mut self,
values: Vec<Sourced<KernelParameter>>,
origins: Vec<Provenance>,
)
pub fn set_sysctls_with_origins( &mut self, values: Vec<Sourced<KernelParameter>>, origins: Vec<Provenance>, )
Sets kernel parameters with collection-level provenance.
Sourcepub fn sysctls(&self) -> Option<&[Sourced<KernelParameter>]>
pub fn sysctls(&self) -> Option<&[Sourced<KernelParameter>]>
Returns kernel-parameter assignments, preserving explicit-empty state.
Sourcepub fn sysctls_origins(&self) -> &[Provenance]
pub fn sysctls_origins(&self) -> &[Provenance]
Returns collection-level kernel-parameter provenance.
Sourcepub fn set_ulimits(&mut self, values: Vec<Sourced<ResourceLimit>>)
pub fn set_ulimits(&mut self, values: Vec<Sourced<ResourceLimit>>)
Sets ordered resource limits.
Sourcepub fn set_ulimits_with_origins(
&mut self,
values: Vec<Sourced<ResourceLimit>>,
origins: Vec<Provenance>,
)
pub fn set_ulimits_with_origins( &mut self, values: Vec<Sourced<ResourceLimit>>, origins: Vec<Provenance>, )
Sets resource limits with collection-level provenance.
Sourcepub fn ulimits(&self) -> Option<&[Sourced<ResourceLimit>]>
pub fn ulimits(&self) -> Option<&[Sourced<ResourceLimit>]>
Returns resource limits, preserving explicit-empty state.
Sourcepub fn ulimits_origins(&self) -> &[Provenance]
pub fn ulimits_origins(&self) -> &[Provenance]
Returns collection-level resource-limit provenance.
Sourcepub fn set_devices(&mut self, values: Vec<Sourced<Device>>)
pub fn set_devices(&mut self, values: Vec<Sourced<Device>>)
Sets ordered short/long device declarations.
Sourcepub fn set_devices_with_origins(
&mut self,
values: Vec<Sourced<Device>>,
origins: Vec<Provenance>,
)
pub fn set_devices_with_origins( &mut self, values: Vec<Sourced<Device>>, origins: Vec<Provenance>, )
Sets devices with collection-level provenance.
Sourcepub fn devices(&self) -> Option<&[Sourced<Device>]>
pub fn devices(&self) -> Option<&[Sourced<Device>]>
Returns device declarations, preserving explicit-empty state.
Sourcepub fn devices_origins(&self) -> &[Provenance]
pub fn devices_origins(&self) -> &[Provenance]
Returns collection-level device provenance.
Sourcepub fn set_stop_signal(&mut self, signal: Sourced<ProtectedString>)
pub fn set_stop_signal(&mut self, signal: Sourced<ProtectedString>)
Sets the explicit stop-signal spelling.
Sourcepub const fn stop_signal(&self) -> Option<&Sourced<ProtectedString>>
pub const fn stop_signal(&self) -> Option<&Sourced<ProtectedString>>
Returns the raw explicit stop-signal spelling.
Sourcepub fn set_podman_args(&mut self, values: Vec<Sourced<ProtectedString>>)
pub fn set_podman_args(&mut self, values: Vec<Sourced<ProtectedString>>)
Sets ordered source-authored Podman arguments, retaining an explicit empty collection.
Sourcepub fn set_podman_args_with_origins(
&mut self,
values: Vec<Sourced<ProtectedString>>,
origins: Vec<Provenance>,
)
pub fn set_podman_args_with_origins( &mut self, values: Vec<Sourced<ProtectedString>>, origins: Vec<Provenance>, )
Sets ordered source-authored Podman arguments with collection-level provenance.
Sourcepub fn add_podman_arg(&mut self, value: Sourced<ProtectedString>)
pub fn add_podman_arg(&mut self, value: Sourced<ProtectedString>)
Appends one protected source-authored Podman argument in source order.
Sourcepub fn podman_args(&self) -> Option<&[Sourced<ProtectedString>]>
pub fn podman_args(&self) -> Option<&[Sourced<ProtectedString>]>
Returns source-authored Podman arguments, preserving omitted versus explicit-empty state.
Sourcepub fn podman_args_origins(&self) -> &[Provenance]
pub fn podman_args_origins(&self) -> &[Provenance]
Returns collection-level Podman-argument provenance.
Sourcepub fn add_environment(&mut self, value: Sourced<EnvironmentVariable>)
pub fn add_environment(&mut self, value: Sourced<EnvironmentVariable>)
Appends an environment entry.
Sourcepub fn environment(&self) -> &[Sourced<EnvironmentVariable>]
pub fn environment(&self) -> &[Sourced<EnvironmentVariable>]
Returns environment entries in authored order.
Sourcepub fn add_environment_file(&mut self, value: Sourced<EnvironmentFile>)
pub fn add_environment_file(&mut self, value: Sourced<EnvironmentFile>)
Appends an environment-file declaration without reading the referenced file.
Sourcepub fn environment_files(&self) -> &[Sourced<EnvironmentFile>]
pub fn environment_files(&self) -> &[Sourced<EnvironmentFile>]
Returns environment-file declarations in authored order.
Sourcepub fn add_host_mapping(&mut self, value: Sourced<HostMapping>)
pub fn add_host_mapping(&mut self, value: Sourced<HostMapping>)
Appends an explicit hostname-to-address mapping.
Sourcepub fn host_mappings(&self) -> &[Sourced<HostMapping>]
pub fn host_mappings(&self) -> &[Sourced<HostMapping>]
Returns explicit host mappings in authored order.
Sourcepub fn add_config_grant(&mut self, value: Sourced<ResourceGrant>)
pub fn add_config_grant(&mut self, value: Sourced<ResourceGrant>)
Appends a configuration grant in source order.
Sourcepub fn config_grants(&self) -> &[Sourced<ResourceGrant>]
pub fn config_grants(&self) -> &[Sourced<ResourceGrant>]
Returns configuration grants in source order.
Sourcepub fn add_secret_grant(&mut self, value: Sourced<ResourceGrant>)
pub fn add_secret_grant(&mut self, value: Sourced<ResourceGrant>)
Appends a secret grant in source order.
Sourcepub fn secret_grants(&self) -> &[Sourced<ResourceGrant>]
pub fn secret_grants(&self) -> &[Sourced<ResourceGrant>]
Returns secret grants in source order.
Sourcepub fn add_network(&mut self, value: Sourced<NetworkAttachment>)
pub fn add_network(&mut self, value: Sourced<NetworkAttachment>)
Appends a network attachment.
Sourcepub fn replace_network(
&mut self,
index: usize,
value: Sourced<NetworkAttachment>,
) -> Result<Sourced<NetworkAttachment>, ModelError>
pub fn replace_network( &mut self, index: usize, value: Sourced<NetworkAttachment>, ) -> Result<Sourced<NetworkAttachment>, ModelError>
Replaces one existing network attachment without changing authored order.
Returns the previous attachment. This narrow mutation boundary lets importers enrich an attachment only after later native entries establish attachment-scoped details.
§Errors
Returns ModelError::UnknownNetworkAttachmentIndex when index is outside the ordered
attachment collection.
Sourcepub fn networks(&self) -> &[Sourced<NetworkAttachment>]
pub fn networks(&self) -> &[Sourced<NetworkAttachment>]
Returns network attachments in authored order.
Sourcepub fn add_dependency(&mut self, value: Sourced<ServiceDependency>)
pub fn add_dependency(&mut self, value: Sourced<ServiceDependency>)
Appends a service dependency in source order.
Sourcepub fn dependencies(&self) -> &[Sourced<ServiceDependency>]
pub fn dependencies(&self) -> &[Sourced<ServiceDependency>]
Returns service dependencies in source order.
Sourcepub fn validate_image_source_exclusivity(&self) -> Result<(), ModelError>
pub fn validate_image_source_exclusivity(&self) -> Result<(), ModelError>
Validates that a root filesystem was not combined with any image source.
This is public so adapters that incrementally map services can surface an invalid native
combination before inserting it into an Application.
§Errors
Returns ModelError::RootfsImageSourceConflict when both forms are present.