pub struct ContainerState {
pub oci_state: State,
pub created: DateTime<Utc>,
pub started: Option<DateTime<Utc>>,
pub finished: Option<DateTime<Utc>>,
pub exit_code: Option<i32>,
pub name: Option<String>,
pub image: Option<String>,
pub rootfs: PathBuf,
}Expand description
Extended container state with additional metadata.
This extends the OCI state with ArcBox-specific information.
Fields§
§oci_state: StateOCI state.
created: DateTime<Utc>Creation timestamp.
started: Option<DateTime<Utc>>Start timestamp (if started).
finished: Option<DateTime<Utc>>Exit timestamp (if stopped).
exit_code: Option<i32>Exit code (if stopped).
name: Option<String>Container name (if named).
image: Option<String>Image reference.
rootfs: PathBufRoot filesystem path.
Implementations§
Source§impl ContainerState
impl ContainerState
Sourcepub fn mark_created(&mut self) -> Result<()>
pub fn mark_created(&mut self) -> Result<()>
Mark container as created.
Sourcepub fn mark_started(&mut self, pid: u32) -> Result<()>
pub fn mark_started(&mut self, pid: u32) -> Result<()>
Mark container as started.
Sourcepub fn mark_stopped(&mut self, exit_code: i32) -> Result<()>
pub fn mark_stopped(&mut self, exit_code: i32) -> Result<()>
Mark container as stopped.
Trait Implementations§
Source§impl Clone for ContainerState
impl Clone for ContainerState
Source§fn clone(&self) -> ContainerState
fn clone(&self) -> ContainerState
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ContainerState
impl Debug for ContainerState
Source§impl<'de> Deserialize<'de> for ContainerState
impl<'de> Deserialize<'de> for ContainerState
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ContainerState
impl RefUnwindSafe for ContainerState
impl Send for ContainerState
impl Sync for ContainerState
impl Unpin for ContainerState
impl UnsafeUnpin for ContainerState
impl UnwindSafe for ContainerState
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more