pub struct CrunHandler { /* private fields */ }Expand description
Owns both the foreground crun run process and the OCI runtime state.
Lifecycle operations always target the container ID through crun; merely
signalling the wrapper process is never treated as cleanup.
Dropping the in-process handle deliberately detaches without destroying the
workload so short-lived CLI commands can launch persistent boxes. Explicit
lifecycle operations and crash reconciliation own runtime cleanup.
Trait Implementations§
Source§impl VmHandler for CrunHandler
impl VmHandler for CrunHandler
Source§fn stop(&mut self, signal: i32, timeout_ms: u64) -> Result<()>
fn stop(&mut self, signal: i32, timeout_ms: u64) -> Result<()>
Stop the VM. Sends
signal first, then SIGKILL after timeout_ms.Source§fn is_running(&self) -> bool
fn is_running(&self) -> bool
Check if the VM process is still alive.
Source§fn has_exited(&self) -> bool
fn has_exited(&self) -> bool
Whether the VM process has exited, treating a zombie (an exited child not
yet reaped by its parent) as exited. Read more
Auto Trait Implementations§
impl !Freeze for CrunHandler
impl RefUnwindSafe for CrunHandler
impl Send for CrunHandler
impl Sync for CrunHandler
impl Unpin for CrunHandler
impl UnsafeUnpin for CrunHandler
impl UnwindSafe for CrunHandler
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more