pub enum ProcStatus {
Starting,
Running {
pid: u32,
started_at: SystemTime,
},
Ready {
pid: u32,
started_at: SystemTime,
addr: ChannelAddr,
agent: ActorRef<ProcMeshAgent>,
},
Stopping {
pid: u32,
started_at: SystemTime,
},
Stopped {
exit_code: i32,
stderr_tail: Vec<String>,
},
Killed {
signal: i32,
core_dumped: bool,
},
Failed {
reason: String,
},
}Expand description
Represents the lifecycle state of a proc as hosted in an OS
process managed by BootstrapProcManager.
Note: This type is deliberately distinct from [ProcState] and
[ProcStopReason] (see alloc.rs). Those types model allocator
events - e.g. “a proc was Created/Running/Stopped” - and are
consumed from an event stream during allocation. By contrast,
ProcStatus is a live, queryable view: it reflects the
current observed status of a running proc, as seen through the
BootstrapProcHandle API (stop, kill, status).
In short:
ProcState/ProcStopReason: historical / event-driven modelProcStatus: immediate status surface for lifecycle control
Variants§
Starting
The OS process has been spawned but is not yet fully running. (Process-level: child handle exists, no confirmation yet.)
Running
The OS process is alive and considered running.
(Process-level: pid is known; Proc-level: bootstrap
may still be running.)
Ready
Ready means bootstrap has completed and the proc is serving.
(Process-level: pid is known; Proc-level: bootstrap
completed.)
Stopping
A stop has been requested (SIGTERM, graceful shutdown, etc.), but the OS process has not yet fully exited. (Proc-level: shutdown in progress; Process-level: still running.)
Stopped
The process exited with a normal exit code. (Process-level: exit observed.)
Killed
The process was killed by a signal (e.g. SIGKILL). (Process-level: abnormal termination.)
Failed
The proc or its process failed for some other reason (bootstrap error, unexpected condition, etc.). (Both levels: catch-all failure.)
Implementations§
Source§impl ProcStatus
impl ProcStatus
Sourcepub fn is_exit(&self) -> bool
pub fn is_exit(&self) -> bool
Returns true if the proc is in a terminal (exited) state:
ProcStatus::Stopped, ProcStatus::Killed, or
ProcStatus::Failed.
Trait Implementations§
Source§impl Clone for ProcStatus
impl Clone for ProcStatus
Source§fn clone(&self) -> ProcStatus
fn clone(&self) -> ProcStatus
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ProcStatus
impl Debug for ProcStatus
Source§impl<'de> Deserialize<'de> for ProcStatus
impl<'de> Deserialize<'de> for ProcStatus
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>,
Source§impl Display for ProcStatus
impl Display for ProcStatus
Source§impl From<ProcStatus> for Status
impl From<ProcStatus> for Status
Source§fn from(status: ProcStatus) -> Self
fn from(status: ProcStatus) -> Self
Source§impl PartialEq for ProcStatus
impl PartialEq for ProcStatus
Source§impl Serialize for ProcStatus
impl Serialize for ProcStatus
impl Eq for ProcStatus
impl StructuralPartialEq for ProcStatus
Auto Trait Implementations§
impl Freeze for ProcStatus
impl RefUnwindSafe for ProcStatus
impl Send for ProcStatus
impl Sync for ProcStatus
impl Unpin for ProcStatus
impl UnwindSafe for ProcStatus
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<A, M> Handler<IndexedErasedUnbound<M>> for A
impl<A, M> Handler<IndexedErasedUnbound<M>> for A
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
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>
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