pub struct RuntimeSnapshot { /* private fields */ }Expand description
A complete caller-selected set of related runtime observations.
Implementations§
Source§impl RuntimeSnapshot
impl RuntimeSnapshot
Sourcepub const fn new(
application_name: Identifier,
implementation: RuntimeImplementation,
) -> Self
pub const fn new( application_name: Identifier, implementation: RuntimeImplementation, ) -> Self
Creates an empty snapshot without reading a runtime or ambient state.
Sourcepub const fn application_name(&self) -> &Identifier
pub const fn application_name(&self) -> &Identifier
Returns the neutral application name selected by the caller.
Sourcepub const fn implementation(&self) -> &RuntimeImplementation
pub const fn implementation(&self) -> &RuntimeImplementation
Returns the runtime implementation that produced this snapshot.
Sourcepub fn add_container(
&mut self,
container: ContainerObservation,
) -> Result<(), RuntimeSnapshotError>
pub fn add_container( &mut self, container: ContainerObservation, ) -> Result<(), RuntimeSnapshotError>
Adds a uniquely identified container observation.
§Errors
Returns RuntimeSnapshotError for duplicate source identities or container names.
Sourcepub fn containers(&self) -> &[ContainerObservation]
pub fn containers(&self) -> &[ContainerObservation]
Returns containers in caller-selected discovery order.
Sourcepub fn add_image(
&mut self,
image: ImageObservation,
) -> Result<(), RuntimeSnapshotError>
pub fn add_image( &mut self, image: ImageObservation, ) -> Result<(), RuntimeSnapshotError>
Adds a uniquely identified image observation.
§Errors
Returns RuntimeSnapshotError for a duplicate source identity.
Sourcepub fn images(&self) -> &[ImageObservation]
pub fn images(&self) -> &[ImageObservation]
Returns images in caller-selected discovery order.
Sourcepub fn add_network(
&mut self,
network: NetworkObservation,
) -> Result<(), RuntimeSnapshotError>
pub fn add_network( &mut self, network: NetworkObservation, ) -> Result<(), RuntimeSnapshotError>
Adds a uniquely identified and named network observation.
§Errors
Returns RuntimeSnapshotError for duplicate source identities or network names.
Sourcepub fn networks(&self) -> &[NetworkObservation]
pub fn networks(&self) -> &[NetworkObservation]
Returns networks in caller-selected discovery order.
Sourcepub fn add_volume(
&mut self,
volume: VolumeObservation,
) -> Result<(), RuntimeSnapshotError>
pub fn add_volume( &mut self, volume: VolumeObservation, ) -> Result<(), RuntimeSnapshotError>
Adds a uniquely identified and named volume observation.
§Errors
Returns RuntimeSnapshotError for duplicate source identities or volume names.
Sourcepub fn volumes(&self) -> &[VolumeObservation]
pub fn volumes(&self) -> &[VolumeObservation]
Returns volumes in caller-selected discovery order.
Sourcepub fn add_pod(
&mut self,
pod: PodObservation,
) -> Result<(), RuntimeSnapshotError>
pub fn add_pod( &mut self, pod: PodObservation, ) -> Result<(), RuntimeSnapshotError>
Adds a uniquely identified and named pod observation.
§Errors
Returns RuntimeSnapshotError for duplicate source identities or pod names.
Sourcepub fn pods(&self) -> &[PodObservation]
pub fn pods(&self) -> &[PodObservation]
Returns pods in caller-selected discovery order.
Trait Implementations§
Source§impl Clone for RuntimeSnapshot
impl Clone for RuntimeSnapshot
Source§fn clone(&self) -> RuntimeSnapshot
fn clone(&self) -> RuntimeSnapshot
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more