pub struct UpdateState {
pub target_application: Option<PathBuf>,
pub temporary_application: Option<PathBuf>,
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.
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.
Trait Implementations§
Source§impl Clone for UpdateState
impl Clone for UpdateState
Source§fn clone(&self) -> UpdateState
fn clone(&self) -> UpdateState
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 UpdateState
impl Debug for UpdateState
Source§impl Default for UpdateState
impl Default for UpdateState
Source§fn default() -> UpdateState
fn default() -> UpdateState
Returns the “default value” for a type. Read more
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>,
Deserialize this value from the given Serde deserializer. Read more
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
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for UpdateState
impl Serialize for UpdateState
impl StructuralPartialEq for UpdateState
Auto Trait Implementations§
impl Freeze for UpdateState
impl RefUnwindSafe for UpdateState
impl Send for UpdateState
impl Sync for UpdateState
impl Unpin for UpdateState
impl UnsafeUnpin for UpdateState
impl UnwindSafe for UpdateState
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