pub enum EventType {
Show 33 variants
PlanCreated {
plan_id: String,
package_count: usize,
},
ExecutionStarted,
ExecutionFinished {
result: ExecutionResult,
},
PackageStarted {
name: String,
version: String,
},
PackageAttempted {
attempt: u32,
command: String,
},
PackageOutput {
stdout_tail: String,
stderr_tail: String,
},
PackagePublished {
duration_ms: u64,
},
PackageFailed {
class: ErrorClass,
message: String,
},
PackageSkipped {
reason: String,
},
PublishReconciling {
method: ReadinessMethod,
},
PublishReconciled {
outcome: ReconciliationOutcome,
},
StateEventDriftDetected {
drift: StateEventDrift,
},
PackageYanked {
crate_name: String,
version: String,
reason: String,
exit_code: i32,
},
RehearsalStarted {
registry: String,
plan_id: String,
package_count: usize,
},
RehearsalPackagePublished {
name: String,
version: String,
duration_ms: u128,
},
RehearsalPackageFailed {
name: String,
version: String,
class: ErrorClass,
message: String,
},
RehearsalComplete {
passed: bool,
registry: String,
plan_id: String,
summary: String,
},
RehearsalSmokeCheckStarted {
name: String,
version: String,
registry: String,
},
RehearsalSmokeCheckSucceeded {
name: String,
version: String,
duration_ms: u128,
},
RehearsalSmokeCheckFailed {
name: String,
version: String,
message: String,
},
RetryBackoffStarted {
attempt: u32,
max_attempts: u32,
delay_ms: u64,
next_attempt_at: DateTime<Utc>,
reason: ErrorClass,
message: String,
},
ReadinessStarted {
method: ReadinessMethod,
},
ReadinessPoll {
attempt: u32,
visible: bool,
},
ReadinessComplete {
duration_ms: u64,
attempts: u32,
},
ReadinessTimeout {
max_wait_ms: u64,
},
IndexReadinessStarted {
crate_name: String,
version: String,
},
IndexReadinessCheck {
crate_name: String,
version: String,
found: bool,
},
IndexReadinessComplete {
crate_name: String,
version: String,
visible: bool,
},
PreflightStarted,
PreflightWorkspaceVerify {
passed: bool,
output: String,
},
PreflightNewCrateDetected {
crate_name: String,
},
PreflightOwnershipCheck {
crate_name: String,
verified: bool,
},
PreflightComplete {
finishability: Finishability,
},
}Expand description
Types of events that can occur during publishing.
These events are logged to provide a complete audit trail of the publish operation. Each variant carries relevant data.
§Categories
- Lifecycle events: Plan created, execution started/finished
- Package events: Started, attempted, output, published, failed, skipped
- Readiness events: Started, polled, completed, timeout
- Preflight events: Started, verified, ownership checked, completed
§Example
ⓘ
use shipper::types::{EventType, ExecutionResult, ErrorClass, ReadinessMethod, Finishability};
// Lifecycle events
let plan_created = EventType::PlanCreated {
plan_id: "abc123".to_string(),
package_count: 5,
};
let started = EventType::ExecutionStarted;
let finished = EventType::ExecutionFinished {
result: ExecutionResult::Success
};
// Package events
let pkg_started = EventType::PackageStarted {
name: "my-crate".to_string(),
version: "1.0.0".to_string(),
};
let pkg_failed = EventType::PackageFailed {
class: ErrorClass::Retryable,
message: "rate limited".to_string(),
};
// Readiness events
let ready = EventType::ReadinessStarted {
method: ReadinessMethod::Api,
};
// Preflight events
let preflight = EventType::PreflightComplete {
finishability: Finishability::Proven,
};Variants§
PlanCreated
ExecutionStarted
ExecutionFinished
Fields
§
result: ExecutionResultPackageStarted
PackageAttempted
PackageOutput
PackagePublished
PackageFailed
PackageSkipped
PublishReconciling
Fields
§
method: ReadinessMethodPublishReconciled
Fields
§
outcome: ReconciliationOutcomeStateEventDriftDetected
Fields
§
drift: StateEventDriftPackageYanked
RehearsalStarted
RehearsalPackagePublished
RehearsalPackageFailed
RehearsalComplete
Fields
RehearsalSmokeCheckStarted
RehearsalSmokeCheckSucceeded
RehearsalSmokeCheckFailed
RetryBackoffStarted
Fields
§
reason: ErrorClassReadinessStarted
Fields
§
method: ReadinessMethodReadinessPoll
ReadinessComplete
ReadinessTimeout
IndexReadinessStarted
IndexReadinessCheck
IndexReadinessComplete
PreflightStarted
PreflightWorkspaceVerify
PreflightNewCrateDetected
PreflightOwnershipCheck
PreflightComplete
Fields
§
finishability: FinishabilityTrait Implementations§
Source§impl<'de> Deserialize<'de> for EventType
impl<'de> Deserialize<'de> for EventType
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 EventType
impl RefUnwindSafe for EventType
impl Send for EventType
impl Sync for EventType
impl Unpin for EventType
impl UnsafeUnpin for EventType
impl UnwindSafe for EventType
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