Skip to main content

HostUpdateFlow

Struct HostUpdateFlow 

Source
pub struct HostUpdateFlow<'a> { /* private fields */ }
Expand description

One deployment-owned adapter composition. Use a single external process lock for the journal and host operation. This type never acquires a hidden lock, starts a process, selects providers or performs a domain migration.

Implementations§

Source§

impl<'a> HostUpdateFlow<'a>

Source

pub fn new( journal: &'a FileRecoveryStore, adapter: &'a dyn ActivationAdapter, gate: &'a dyn UpdateRecoveryGate, ) -> Self

Composes an explicitly locked journal, host adapter and recovery gate.

Source

pub fn prepare( &self, request: &ActivationRequest, staged: &StagedArtifact, at_ms: u64, ) -> UpdateResult<()>

Persists intent before drain, snapshot and adapter preparation. On any failure the prepared receipt remains inspectable; recovery must inspect host reality rather than assuming that an interrupted callback did nothing. Supply only bytes already authenticated/verified/staged by Update.

Source

pub fn activate( &self, request: &ActivationRequest, staged: &StagedArtifact, at_ms: u64, ) -> UpdateResult<ActivationEvidence>

Repeats the idempotent preparation boundary before activation so a restarted caller cannot skip a previously failed drain/snapshot callback. A failed activation leaves prepared intent; inspect host reality on restart.

Source

pub fn confirm( &self, evidence: &ActivationEvidence, at_ms: u64, ) -> UpdateResult<()>

Confirms host health, commits the adapter, then records completion. Backend and renderer readiness must both be included in a desktop adapter. Failed health durably requests rollback. Failed/ambiguous commit retains pending intent and never reports success or guesses a rollback.

Source

pub fn rollback(&self) -> UpdateResult<()>

Runs host rollback but does not record completion. The host must re-probe the actual restored identity and supply RecordRolledBack to the journal.

Auto Trait Implementations§

§

impl<'a> !RefUnwindSafe for HostUpdateFlow<'a>

§

impl<'a> !UnwindSafe for HostUpdateFlow<'a>

§

impl<'a> Freeze for HostUpdateFlow<'a>

§

impl<'a> Send for HostUpdateFlow<'a>

§

impl<'a> Sync for HostUpdateFlow<'a>

§

impl<'a> Unpin for HostUpdateFlow<'a>

§

impl<'a> UnsafeUnpin for HostUpdateFlow<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.