pub struct ExecutionState {
pub state_version: String,
pub plan_id: String,
pub registry: Registry,
pub created_at: DateTime<Utc>,
pub updated_at: DateTime<Utc>,
pub packages: BTreeMap<String, PackageProgress>,
}Expand description
The complete state of an in-progress publish operation.
This is the root structure persisted to disk during publishing. It contains the plan ID, registry info, and progress for all packages.
§Example
ⓘ
use chrono::Utc;
use shipper::types::{ExecutionState, PackageProgress, Registry};
let state = ExecutionState {
state_version: "shipper.state.v1".to_string(),
plan_id: "abc123".to_string(),
registry: Registry::crates_io(),
created_at: Utc::now(),
updated_at: Utc::now(),
packages: std::collections::BTreeMap::new(),
};
// Save to disk for resumability§Persistence
The execution state is saved to state.json in the state directory
after each package completes. This allows Shipper to resume
interrupted operations.
Fields§
§state_version: String§plan_id: String§registry: Registry§created_at: DateTime<Utc>§updated_at: DateTime<Utc>§packages: BTreeMap<String, PackageProgress>Trait Implementations§
Source§impl Clone for ExecutionState
impl Clone for ExecutionState
Source§fn clone(&self) -> ExecutionState
fn clone(&self) -> ExecutionState
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ExecutionState
impl Debug for ExecutionState
Source§impl<'de> Deserialize<'de> for ExecutionState
impl<'de> Deserialize<'de> for ExecutionState
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 ExecutionState
impl RefUnwindSafe for ExecutionState
impl Send for ExecutionState
impl Sync for ExecutionState
impl Unpin for ExecutionState
impl UnsafeUnpin for ExecutionState
impl UnwindSafe for ExecutionState
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