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).
impl UpdateWorkerHandle
Control and entrypoints on UpdateWorkerHandle (Sec 11.2 / 11.8).
Sourcepub fn check_update(
&self,
project: &str,
channel: &str,
) -> Result<ReleaseManifest, DynamicReleaseError>
pub fn check_update( &self, project: &str, channel: &str, ) -> Result<ReleaseManifest, DynamicReleaseError>
Sourcepub fn prepare_release(
&self,
manifest: ReleaseManifest,
snapshot: Option<NestedStateSnapshot>,
) -> Result<PreparedReleaseCandidate, DynamicReleaseError>
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 revisionR.
§Returns
Result<PreparedReleaseCandidate, DynamicReleaseError>- Ready candidate or typed error.
Sourcepub fn seed_verified_blobs(&self, blobs: BTreeMap<String, Vec<u8>>)
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.
Sourcepub fn submit_ui_snapshot(&self, snapshot: NestedStateSnapshot)
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 revisionR.
Sourcepub fn try_take_ready_candidate(&self) -> Option<PreparedReleaseCandidate>
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.
Sourcepub fn request_reconcile(&self)
pub fn request_reconcile(&self)
Requests an immediate manifest reconciliation on the background worker (e.g. on foreground resume).
Sourcepub fn last_event_id(&self) -> Option<String>
pub fn last_event_id(&self) -> Option<String>
Returns the latest Last-Event-ID cursor accepted by the background SSE client.
§Returns
Option<String>- ActiveLast-Event-IDcursor string.
Sourcepub fn set_last_event_id(&self, cursor: Option<String>)
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.
Sourcepub fn fetched_blob_hashes(&self) -> Vec<String>
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.
Sourcepub fn sse_connect_count(&self) -> u64
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.
Sourcepub fn last_error(&self) -> Option<DynamicReleaseError>
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.
Trait Implementations§
Source§impl Debug for UpdateWorkerHandle
impl Debug for UpdateWorkerHandle
Source§impl Drop for UpdateWorkerHandle
Automatic worker shutdown when UpdateWorkerHandle is dropped.
impl Drop for UpdateWorkerHandle
Automatic worker shutdown when UpdateWorkerHandle is dropped.