pub struct PendingUpgrade {
pub version: String,
pub staged_path: PathBuf,
pub sha256: String,
pub size: u64,
pub created_at: String,
pub attempts: u32,
}Expand description
Pointer record stored at ~/.atomcode/staged/pending.json. Describes
a downloaded binary that hasn’t yet been promoted to live. Lifecycle:
written by prepare_deferred_upgrade, read (and deleted on success /
incremented on failure) by apply_pending_upgrade.
Fields§
§version: StringVersion tag the staged binary represents, e.g. v4.19.1.
staged_path: PathBufAbsolute path to the verified binary sitting in staged_dir().
sha256: StringSHA256 of the staged binary (lowercase hex). Re-verified at apply time so a partial overwrite between sessions (e.g. disk full) doesn’t install a corrupted file.
size: u64Size in bytes; cheap sanity check before we recompute sha256.
created_at: StringRFC3339 timestamp for audit / debug. Not load-bearing.
attempts: u32How many times we’ve attempted apply and failed. When this hits
MAX_APPLY_ATTEMPTS, the staged file is discarded instead of
retried again on the following startup.
Trait Implementations§
Source§impl Clone for PendingUpgrade
impl Clone for PendingUpgrade
Source§fn clone(&self) -> PendingUpgrade
fn clone(&self) -> PendingUpgrade
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 PendingUpgrade
impl Debug for PendingUpgrade
Source§impl<'de> Deserialize<'de> for PendingUpgrade
impl<'de> Deserialize<'de> for PendingUpgrade
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>,
Auto Trait Implementations§
impl Freeze for PendingUpgrade
impl RefUnwindSafe for PendingUpgrade
impl Send for PendingUpgrade
impl Sync for PendingUpgrade
impl Unpin for PendingUpgrade
impl UnsafeUnpin for PendingUpgrade
impl UnwindSafe for PendingUpgrade
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more