pub struct ContainerRef { /* private fields */ }Expand description
A canonical, incarnation-pinned reference to one running container.
Built only from an inspected ContainerIdentity: the 64-hex id is
revalidated at construction, so a display label or name can never
become an identity by accident. Every read re-checks started_at
against the engine before touching the filesystem, so a restart or
same-name recreation is a typed ContainerError::StaleIdentity
rather than silently wrong bytes.
Implementations§
Source§impl ContainerRef
impl ContainerRef
Sourcepub fn of(identity: &ContainerIdentity) -> Result<Self, ContainerError>
pub fn of(identity: &ContainerIdentity) -> Result<Self, ContainerError>
The canonical reference for an inspected identity. Refuses (as a
protocol violation) an identity whose id is not the 64-hex inspect
id — names and prefixes resolve through crate::inspect first.
Sourcepub fn id(&self) -> &ContainerId
pub fn id(&self) -> &ContainerId
The canonical 64-hex id — the same identity
strop_workspace::Filesystem::Container carries.
Sourcepub fn started_at(&self) -> &str
pub fn started_at(&self) -> &str
The incarnation marker captured at inspect time.
Trait Implementations§
Source§impl Clone for ContainerRef
impl Clone for ContainerRef
Source§fn clone(&self) -> ContainerRef
fn clone(&self) -> ContainerRef
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more