Skip to main content

UpdateWorkerHandle

Struct UpdateWorkerHandle 

Source
pub struct UpdateWorkerHandle { /* private fields */ }
Expand description

Running handle to the dedicated background UpdateWorker thread.

Implementations§

Source§

impl UpdateWorkerHandle

Control and entrypoints on UpdateWorkerHandle (Sec 11.2 / 11.8).

Source

pub fn check_update( &self, project: &str, channel: &str, ) -> Result<ReleaseManifest, DynamicReleaseError>

Checks and fetches the latest compatible signed manifest for (project, channel) (Sec 11.2).

§Arguments
  • &str - Logical project identifier.
  • &str - Channel name.
§Returns
  • Result<ReleaseManifest, DynamicReleaseError> - Verified signed manifest or error.
Source

pub fn prepare_release( &self, manifest: ReleaseManifest, snapshot: Option<NestedStateSnapshot>, ) -> Result<PreparedReleaseCandidate, DynamicReleaseError>

Prepares a release candidate using the worker’s verified cache, incremental hash diff, and pure migrator (Sec 11.2).

§Arguments
  • ReleaseManifest - Signed target release manifest.
  • Option<NestedStateSnapshot> - Optional captured route UI state snapshot at revision R.
§Returns
  • Result<PreparedReleaseCandidate, DynamicReleaseError> - Ready candidate or typed error.
Source

pub fn seed_verified_blobs(&self, blobs: BTreeMap<String, Vec<u8>>)

Seeds verified content-addressed blobs into the worker’s local cache (for built-in/offline startup).

§Arguments
  • BTreeMap<String, Vec<u8>> - Map of SHA-256 hex digest to verified blob bytes.
Source

pub fn submit_ui_snapshot(&self, snapshot: NestedStateSnapshot)

Queues a captured route NestedStateSnapshot so the next background preparation migrates it off the UI thread.

§Arguments
  • NestedStateSnapshot - Immutable snapshot captured at revision R.
Source

pub fn try_take_ready_candidate(&self) -> Option<PreparedReleaseCandidate>

Non-blockingly polls the bounded candidate mailbox from the UI thread.

§Returns
  • Option<PreparedReleaseCandidate> - Latest prepared candidate ready for frame-boundary swap.
Source

pub fn request_reconcile(&self)

Requests an immediate manifest reconciliation on the background worker (e.g. on foreground resume).

Source

pub fn last_event_id(&self) -> Option<String>

Returns the latest Last-Event-ID cursor accepted by the background SSE client.

§Returns
  • Option<String> - Active Last-Event-ID cursor string.
Source

pub fn set_last_event_id(&self, cursor: Option<String>)

Overrides the Last-Event-ID cursor (e.g. when restoring persisted resume state across restarts).

§Arguments
  • Option<String> - Cursor string to send on the next SSE connection.
Source

pub fn fetched_blob_hashes(&self) -> Vec<String>

Returns the chronological log of SHA-256 digests actually downloaded over HTTP by this worker.

§Returns
  • Vec<String> - Downloaded blob SHA-256 digests.
Source

pub fn sse_connect_count(&self) -> u64

Returns the number of established SSE sessions (incremented on initial connect and reconnects).

§Returns
  • u64 - Total SSE connect count.
Source

pub fn last_error(&self) -> Option<DynamicReleaseError>

Returns the most recent background error recorded without interrupting the live UI.

§Returns
  • Option<DynamicReleaseError> - Last recorded error if any.
Source

pub fn stop(&mut self)

Signals the dedicated background UpdateWorker thread to stop and joins it cleanly.

Trait Implementations§

Source§

impl Debug for UpdateWorkerHandle

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Drop for UpdateWorkerHandle

Automatic worker shutdown when UpdateWorkerHandle is dropped.

Source§

fn drop(&mut self)

Stops and joins the background worker thread on drop.

Source§

fn pin_drop(self: Pin<&mut Self>)

🔬This is a nightly-only experimental API. (pin_ergonomics)
Execute the destructor for this type, but different to Drop::drop, it requires self to be pinned. Read more

Auto Trait Implementations§

§

impl !RefUnwindSafe for UpdateWorkerHandle

§

impl !UnwindSafe for UpdateWorkerHandle

§

impl Forget for UpdateWorkerHandle

§

impl Freeze for UpdateWorkerHandle
where *const ArcInner<UpdateWorkerShared> is !null: Freeze, PhantomData<ArcInner<UpdateWorkerShared>>: Freeze, *const ArcInner<Inner> is !null: Freeze, PhantomData<ArcInner<Inner>>: Freeze, *const ArcInner<Packet<'static, ()>> is !null: Freeze, PhantomData<ArcInner<Packet<'static, ()>>>: Freeze,

§

impl Move for UpdateWorkerHandle

§

impl Send for UpdateWorkerHandle
where Arc<UpdateWorkerShared>: Send, JoinHandle<()>: Send,

§

impl Sync for UpdateWorkerHandle
where Arc<UpdateWorkerShared>: Sync, JoinHandle<()>: Sync,

§

impl Unpin for UpdateWorkerHandle
where Arc<UpdateWorkerShared>: Unpin, Arc<Inner, System>: Unpin, Arc<Packet<'static, ()>>: Unpin,

§

impl UnsafeUnpin for UpdateWorkerHandle
where *const ArcInner<UpdateWorkerShared> is !null: UnsafeUnpin, PhantomData<ArcInner<UpdateWorkerShared>>: UnsafeUnpin, *const ArcInner<Inner> is !null: UnsafeUnpin, PhantomData<ArcInner<Inner>>: UnsafeUnpin, *const ArcInner<Packet<'static, ()>> is !null: UnsafeUnpin, PhantomData<ArcInner<Packet<'static, ()>>>: UnsafeUnpin,

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, 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.