v0.3.9-pre.002-fix.001
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// file: crates/ksp-worker-api/src/lifecycle.rs
|
||||
// version: 1
|
||||
// version: 2
|
||||
|
||||
/// Current lifecycle state of one continuous Worker.
|
||||
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
|
||||
@@ -19,7 +19,7 @@ pub enum WorkerState {
|
||||
Faulted(crate::ErrorCode),
|
||||
}
|
||||
|
||||
impl WorkerState {
|
||||
impl crate::WorkerState {
|
||||
/// Returns the stable safe lifecycle code without rendering Worker data.
|
||||
#[must_use]
|
||||
pub const fn code(&self) -> &'static str {
|
||||
@@ -63,7 +63,7 @@ pub enum WorkerHealth {
|
||||
Unhealthy,
|
||||
}
|
||||
|
||||
impl WorkerHealth {
|
||||
impl crate::WorkerHealth {
|
||||
/// Returns the stable safe code for this health classification.
|
||||
#[must_use]
|
||||
pub const fn code(&self) -> &'static str {
|
||||
@@ -88,7 +88,7 @@ pub enum WorkerActivity {
|
||||
Active,
|
||||
}
|
||||
|
||||
impl WorkerActivity {
|
||||
impl crate::WorkerActivity {
|
||||
/// Returns the stable safe code for this activity classification.
|
||||
#[must_use]
|
||||
pub const fn code(&self) -> &'static str {
|
||||
@@ -108,7 +108,7 @@ pub struct WorkerLifecycle {
|
||||
state: crate::WorkerState,
|
||||
}
|
||||
|
||||
impl WorkerLifecycle {
|
||||
impl crate::WorkerLifecycle {
|
||||
/// Creates one lifecycle in [`WorkerState::Created`] state.
|
||||
#[must_use]
|
||||
pub const fn new(id: crate::WorkerId, kind: crate::WorkerKindCode) -> Self {
|
||||
@@ -167,7 +167,7 @@ impl WorkerLifecycle {
|
||||
}
|
||||
}
|
||||
|
||||
impl std::fmt::Debug for WorkerLifecycle {
|
||||
impl std::fmt::Debug for crate::WorkerLifecycle {
|
||||
fn fmt(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
return formatter.debug_struct("WorkerLifecycle").field("id", &self.id).field("kind", &self.kind).field("state", &self.state).finish();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user