pub struct ContainerObservation { /* private fields */ }Expand description
Effective state and relationships of one runtime container.
Implementations§
Source§impl ContainerObservation
impl ContainerObservation
Sourcepub const fn new(source_id: SourceId, name: Identifier) -> Self
pub const fn new(source_id: SourceId, name: Identifier) -> Self
Creates an empty container observation for an explicitly named resource.
Sourcepub const fn source_id(&self) -> &SourceId
pub const fn source_id(&self) -> &SourceId
Returns the stable, caller-redacted container identity.
Sourcepub const fn name(&self) -> &Identifier
pub const fn name(&self) -> &Identifier
Returns the neutral service name selected by the runtime adapter.
Sourcepub fn set_image(
&mut self,
image: ImageReference,
image_source_id: Option<SourceId>,
)
pub fn set_image( &mut self, image: ImageReference, image_source_id: Option<SourceId>, )
Records the effective image reference and optional linked image observation.
Sourcepub const fn image(&self) -> Option<&ImageReference>
pub const fn image(&self) -> Option<&ImageReference>
Returns the effective image reference.
Sourcepub const fn image_source_id(&self) -> Option<&SourceId>
pub const fn image_source_id(&self) -> Option<&SourceId>
Returns the linked image-observation identity used for override reconstruction.
Sourcepub fn set_command(&mut self, command: EffectiveCommand)
pub fn set_command(&mut self, command: EffectiveCommand)
Records the effective container command.
Sourcepub const fn command(&self) -> Option<&EffectiveCommand>
pub const fn command(&self) -> Option<&EffectiveCommand>
Returns the effective command, if the adapter supplied it.
Sourcepub fn set_restart_policy(&mut self, restart_policy: RestartPolicy)
pub fn set_restart_policy(&mut self, restart_policy: RestartPolicy)
Records the effective container-level automatic restart policy.
Sourcepub const fn restart_policy(&self) -> Option<RestartPolicy>
pub const fn restart_policy(&self) -> Option<RestartPolicy>
Returns the effective container-level automatic restart policy, if supplied.
Sourcepub fn set_environment(&mut self, environment: Vec<RuntimeEnvironmentVariable>)
pub fn set_environment(&mut self, environment: Vec<RuntimeEnvironmentVariable>)
Records the complete ordered effective environment, including an empty collection.
Sourcepub fn environment(&self) -> Option<&[RuntimeEnvironmentVariable]>
pub fn environment(&self) -> Option<&[RuntimeEnvironmentVariable]>
Returns the effective environment, if the adapter supplied it.
Sourcepub fn set_labels(&mut self, labels: Vec<RuntimeMetadataLabel>)
pub fn set_labels(&mut self, labels: Vec<RuntimeMetadataLabel>)
Records the complete deterministic effective metadata-label map, including an empty map.
Sourcepub fn labels(&self) -> Option<&[RuntimeMetadataLabel]>
pub fn labels(&self) -> Option<&[RuntimeMetadataLabel]>
Returns the effective metadata labels, if the adapter supplied them.
Sourcepub fn set_user(&mut self, user: impl Into<String>)
pub fn set_user(&mut self, user: impl Into<String>)
Records a non-empty effective container user as sensitive runtime data.
Sourcepub const fn user(&self) -> Option<&ProtectedString>
pub const fn user(&self) -> Option<&ProtectedString>
Returns the effective container user, if the adapter supplied one.
Sourcepub fn set_working_directory(&mut self, working_directory: impl Into<String>)
pub fn set_working_directory(&mut self, working_directory: impl Into<String>)
Records a non-empty effective container working directory as sensitive runtime data.
Sourcepub const fn working_directory(&self) -> Option<&ProtectedString>
pub const fn working_directory(&self) -> Option<&ProtectedString>
Returns the effective container working directory, if supplied.
Sourcepub fn set_healthcheck(&mut self, healthcheck: RuntimeHealthcheck)
pub fn set_healthcheck(&mut self, healthcheck: RuntimeHealthcheck)
Records the complete effective regular health-check configuration, including its absence.
Sourcepub const fn healthcheck(&self) -> Option<&RuntimeHealthcheck>
pub const fn healthcheck(&self) -> Option<&RuntimeHealthcheck>
Returns the observed regular health-check configuration, if the adapter supplied it.
Sourcepub fn set_read_only_root_filesystem(&mut self, read_only: bool)
pub fn set_read_only_root_filesystem(&mut self, read_only: bool)
Records the effective read-only-root-filesystem choice.
Sourcepub const fn read_only_root_filesystem(&self) -> Option<bool>
pub const fn read_only_root_filesystem(&self) -> Option<bool>
Returns the effective read-only-root-filesystem choice, if supplied.
Sourcepub fn add_network(&mut self, network: NetworkAttachment)
pub fn add_network(&mut self, network: NetworkAttachment)
Appends one observed network relationship with all aliases in runtime response order.
Sourcepub fn networks(&self) -> &[NetworkAttachment]
pub fn networks(&self) -> &[NetworkAttachment]
Returns observed network relationships in runtime response order.
Sourcepub fn set_pod_source_id(&mut self, source_id: SourceId)
pub fn set_pod_source_id(&mut self, source_id: SourceId)
Records the containing Podman pod observation, if any.
Sourcepub const fn pod_source_id(&self) -> Option<&SourceId>
pub const fn pod_source_id(&self) -> Option<&SourceId>
Returns the containing pod identity.
Sourcepub fn set_creation_evidence(&mut self, evidence: CreationEvidence)
pub fn set_creation_evidence(&mut self, evidence: CreationEvidence)
Attaches optional creation-command evidence without changing effective values.
Sourcepub const fn creation_evidence(&self) -> Option<&CreationEvidence>
pub const fn creation_evidence(&self) -> Option<&CreationEvidence>
Returns optional creation-command evidence.
Trait Implementations§
Source§impl Clone for ContainerObservation
impl Clone for ContainerObservation
Source§fn clone(&self) -> ContainerObservation
fn clone(&self) -> ContainerObservation
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more