Skip to main content

ContainerObservation

Struct ContainerObservation 

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

Effective state and relationships of one runtime container.

Implementations§

Source§

impl ContainerObservation

Source

pub const fn new(source_id: SourceId, name: Identifier) -> Self

Creates an empty container observation for an explicitly named resource.

Source

pub const fn source_id(&self) -> &SourceId

Returns the stable, caller-redacted container identity.

Source

pub const fn name(&self) -> &Identifier

Returns the neutral service name selected by the runtime adapter.

Source

pub fn set_image( &mut self, image: ImageReference, image_source_id: Option<SourceId>, )

Records the effective image reference and optional linked image observation.

Source

pub const fn image(&self) -> Option<&ImageReference>

Returns the effective image reference.

Source

pub const fn image_source_id(&self) -> Option<&SourceId>

Returns the linked image-observation identity used for override reconstruction.

Source

pub fn set_command(&mut self, command: EffectiveCommand)

Records the effective container command.

Source

pub const fn command(&self) -> Option<&EffectiveCommand>

Returns the effective command, if the adapter supplied it.

Source

pub fn set_restart_policy(&mut self, restart_policy: RestartPolicy)

Records the effective container-level automatic restart policy.

Source

pub const fn restart_policy(&self) -> Option<RestartPolicy>

Returns the effective container-level automatic restart policy, if supplied.

Source

pub fn set_environment(&mut self, environment: Vec<RuntimeEnvironmentVariable>)

Records the complete ordered effective environment, including an empty collection.

Source

pub fn environment(&self) -> Option<&[RuntimeEnvironmentVariable]>

Returns the effective environment, if the adapter supplied it.

Source

pub fn set_labels(&mut self, labels: Vec<RuntimeMetadataLabel>)

Records the complete deterministic effective metadata-label map, including an empty map.

Source

pub fn labels(&self) -> Option<&[RuntimeMetadataLabel]>

Returns the effective metadata labels, if the adapter supplied them.

Source

pub fn set_user(&mut self, user: impl Into<String>)

Records a non-empty effective container user as sensitive runtime data.

Source

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

Returns the effective container user, if the adapter supplied one.

Source

pub fn set_working_directory(&mut self, working_directory: impl Into<String>)

Records a non-empty effective container working directory as sensitive runtime data.

Source

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

Returns the effective container working directory, if supplied.

Source

pub fn set_healthcheck(&mut self, healthcheck: RuntimeHealthcheck)

Records the complete effective regular health-check configuration, including its absence.

Source

pub const fn healthcheck(&self) -> Option<&RuntimeHealthcheck>

Returns the observed regular health-check configuration, if the adapter supplied it.

Source

pub fn set_read_only_root_filesystem(&mut self, read_only: bool)

Records the effective read-only-root-filesystem choice.

Source

pub const fn read_only_root_filesystem(&self) -> Option<bool>

Returns the effective read-only-root-filesystem choice, if supplied.

Source

pub fn add_port(&mut self, port: Port)

Appends one observed published port.

Source

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

Returns observed ports in runtime response order.

Source

pub fn add_mount(&mut self, mount: Mount)

Appends one observed storage relationship.

Source

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

Returns observed mounts in runtime response order.

Source

pub fn add_network(&mut self, network: NetworkAttachment)

Appends one observed network relationship with all aliases in runtime response order.

Source

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

Returns observed network relationships in runtime response order.

Source

pub fn set_pod_source_id(&mut self, source_id: SourceId)

Records the containing Podman pod observation, if any.

Source

pub const fn pod_source_id(&self) -> Option<&SourceId>

Returns the containing pod identity.

Source

pub fn set_creation_evidence(&mut self, evidence: CreationEvidence)

Attaches optional creation-command evidence without changing effective values.

Source

pub const fn creation_evidence(&self) -> Option<&CreationEvidence>

Returns optional creation-command evidence.

Trait Implementations§

Source§

impl Clone for ContainerObservation

Source§

fn clone(&self) -> ContainerObservation

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 ContainerObservation

Source§

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

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

impl Eq for ContainerObservation

Source§

impl PartialEq for ContainerObservation

Source§

fn eq(&self, other: &ContainerObservation) -> 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 ContainerObservation

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.