pub struct UpdateState {
pub target_application: Option<PathBuf>,
pub temporary_application: Option<PathBuf>,
pub trace_context: Option<HashMap<String, String>>,
pub phase: UpdatePhase,
}Expand description
The serializable state which is threaded through the three phases of an
update by relaunching the application with the
RESUME_FLAG followed by this value as JSON.
Fields§
§target_application: Option<PathBuf>The path to the application binary which is being updated.
temporary_application: Option<PathBuf>The path to the temporary binary which the new release was downloaded to.
trace_context: Option<HashMap<String, String>>A trace-context propagation carrier (e.g. the W3C traceparent /
tracestate headers) captured from the phase that relaunched the
application. With the opentelemetry feature it lets the phases of an
update — which each run in a separate process — continue a single
distributed trace. The field is always part of the wire format (so states
stay compatible across feature configurations) but is only populated and
consumed when that feature is enabled.
phase: UpdatePhaseThe phase of the update process which this state represents.
Implementations§
Source§impl UpdateState
impl UpdateState
Sourcepub fn for_phase(&self, phase: UpdatePhase) -> Self
pub fn for_phase(&self, phase: UpdatePhase) -> Self
Produce a copy of this state advanced to the provided UpdatePhase,
preserving the application paths and any captured trace context.
Trait Implementations§
Source§impl Clone for UpdateState
impl Clone for UpdateState
Source§fn clone(&self) -> UpdateState
fn clone(&self) -> UpdateState
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for UpdateState
impl Debug for UpdateState
Source§impl Default for UpdateState
impl Default for UpdateState
Source§fn default() -> UpdateState
fn default() -> UpdateState
Source§impl<'de> Deserialize<'de> for UpdateState
impl<'de> Deserialize<'de> for UpdateState
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 UpdateState
impl Display for UpdateState
impl Eq for UpdateState
Source§impl PartialEq for UpdateState
impl PartialEq for UpdateState
Source§fn eq(&self, other: &UpdateState) -> bool
fn eq(&self, other: &UpdateState) -> bool
self and other values to be equal, and is used by ==.