pub struct ContainerLifecycle;Expand description
Container lifecycle operations (stop, kill, delete)
Implementations§
Source§impl ContainerLifecycle
impl ContainerLifecycle
Sourcepub fn stop(state: &ContainerState, timeout_secs: u64) -> Result<()>
pub fn stop(state: &ContainerState, timeout_secs: u64) -> Result<()>
Stop a container gracefully: SIGTERM, wait for timeout, then SIGKILL
Sourcepub fn kill_container(state: &ContainerState, signal: Signal) -> Result<()>
pub fn kill_container(state: &ContainerState, signal: Signal) -> Result<()>
Send an arbitrary signal to a container
Sourcepub fn remove(
state_mgr: &ContainerStateManager,
state: &ContainerState,
force: bool,
) -> Result<()>
pub fn remove( state_mgr: &ContainerStateManager, state: &ContainerState, force: bool, ) -> Result<()>
Remove a stopped container’s state
Auto Trait Implementations§
impl Freeze for ContainerLifecycle
impl RefUnwindSafe for ContainerLifecycle
impl Send for ContainerLifecycle
impl Sync for ContainerLifecycle
impl Unpin for ContainerLifecycle
impl UnsafeUnpin for ContainerLifecycle
impl UnwindSafe for ContainerLifecycle
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