pub struct DynamicUpdateHub { /* private fields */ }Expand description
Shared cross-platform hub orchestrating surgical component-level and page-level dynamic updates.
Implementations§
Source§impl DynamicUpdateHub
Atomic release-candidate application bridge connecting UpdateWorkerHandle directly to DynamicUpdateHub.
impl DynamicUpdateHub
Atomic release-candidate application bridge connecting UpdateWorkerHandle directly to DynamicUpdateHub.
Sourcepub fn apply_prepared_release(
&self,
candidate: &PreparedReleaseCandidate,
) -> Result<usize, DynamicReleaseError>
pub fn apply_prepared_release( &self, candidate: &PreparedReleaseCandidate, ) -> Result<usize, DynamicReleaseError>
Atomically applies all declarative page and component artifacts from a verified PreparedReleaseCandidate into DynamicUpdateHub.
§Arguments
&Self- Target live dynamic update hub.&PreparedReleaseCandidate- Verified, pre-warmed release candidate fromUpdateWorkerHandle.
§Returns
Result<usize, DynamicReleaseError>- Number of declarative pages and component slots atomically swapped.
Sourcepub fn sync_from_worker(
&self,
worker: &UpdateWorkerHandle,
) -> Result<Option<PreparedReleaseCandidate>, DynamicReleaseError>
pub fn sync_from_worker( &self, worker: &UpdateWorkerHandle, ) -> Result<Option<PreparedReleaseCandidate>, DynamicReleaseError>
Drains the newest verified release candidate from worker without blocking and atomically applies it into DynamicUpdateHub.
§Arguments
&Self- Target live dynamic update hub.&UpdateWorkerHandle- Active background hot-update worker handle.
§Returns
Result<Option<PreparedReleaseCandidate>, DynamicReleaseError>- Applied candidate when a new release was ready, orNone.
Source§impl DynamicUpdateHub
Component-level, page-level, and atomic bundle dynamic update orchestration on DynamicUpdateHub.
impl DynamicUpdateHub
Component-level, page-level, and atomic bundle dynamic update orchestration on DynamicUpdateHub.
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new DynamicUpdateHub with empty component/page registries and zero telemetry.
§Returns
Self- Shared dynamic update hub handle.
Sourcepub fn apply_component(
&self,
update: DynamicComponentUpdate,
) -> Result<u64, DynamicUpdateError>
pub fn apply_component( &self, update: DynamicComponentUpdate, ) -> Result<u64, DynamicUpdateError>
Sourcepub fn apply_component_json(
&self,
json: &str,
) -> Result<u64, DynamicUpdateError>
pub fn apply_component_json( &self, json: &str, ) -> Result<u64, DynamicUpdateError>
Sourcepub fn swap_component_builder<F>(
&self,
id: String,
version: u64,
builder: F,
) -> Result<u64, DynamicUpdateError>
pub fn swap_component_builder<F>( &self, id: String, version: u64, builder: F, ) -> Result<u64, DynamicUpdateError>
Hot-swaps a component slot with a native Rust builder closure without rebuilding sibling UI.
§Arguments
&Self- Hub reference.String- Target component slot ID.u64- Monotonic version number.F- Zero-context native Rust UI builder closure.
§Returns
Result<u64, DynamicUpdateError>- Newly active component version on success.
Sourcepub fn rollback_component(&self, id: &str) -> Result<u64, DynamicUpdateError>
pub fn rollback_component(&self, id: &str) -> Result<u64, DynamicUpdateError>
Sourcepub fn apply_page(
&self,
update: DynamicPageUpdate,
) -> Result<u64, DynamicUpdateError>
pub fn apply_page( &self, update: DynamicPageUpdate, ) -> Result<u64, DynamicUpdateError>
Sourcepub fn apply_page_json(&self, json: &str) -> Result<u64, DynamicUpdateError>
pub fn apply_page_json(&self, json: &str) -> Result<u64, DynamicUpdateError>
Sourcepub fn swap_page_builder<F>(
&self,
route: String,
title: String,
version: u64,
builder: F,
) -> Result<u64, DynamicUpdateError>
pub fn swap_page_builder<F>( &self, route: String, title: String, version: u64, builder: F, ) -> Result<u64, DynamicUpdateError>
Hot-swaps a page route with a native Rust page builder closure.
§Arguments
&Self- Hub reference.String- Target route path.String- Page title.u64- Monotonic page version number.F- Zero-context native Rust page builder closure.
§Returns
Result<u64, DynamicUpdateError>- Newly active page version on success.
Sourcepub fn rollback_page(&self, route: &str) -> Result<u64, DynamicUpdateError>
pub fn rollback_page(&self, route: &str) -> Result<u64, DynamicUpdateError>
Sourcepub fn apply_bundle(
&self,
bundle: DynamicUpdateBundle,
) -> Result<DynamicTelemetry, DynamicUpdateError>
pub fn apply_bundle( &self, bundle: DynamicUpdateBundle, ) -> Result<DynamicTelemetry, DynamicUpdateError>
Validates all component and page entries in bundle before committing them atomically in a single batch.
§Arguments
&Self- Hub reference.DynamicUpdateBundle- Multi-target atomic release bundle.
§Returns
Result<DynamicTelemetry, DynamicUpdateError>- Updated telemetry snapshot on full commit, or error with zero partial mutation.
Sourcepub fn apply_bundle_json(
&self,
json: &str,
) -> Result<DynamicTelemetry, DynamicUpdateError>
pub fn apply_bundle_json( &self, json: &str, ) -> Result<DynamicTelemetry, DynamicUpdateError>
Sourcepub fn on_action<F>(&self, handler: F)where
F: FnMut(&DynamicActionEvent) + 'static,
pub fn on_action<F>(&self, handler: F)where
F: FnMut(&DynamicActionEvent) + 'static,
Registers an action callback invoked whenever a button inside a dynamically updated component or page is clicked.
§Arguments
&Self- Hub reference.F- Action callback receiving&DynamicActionEvent.
Sourcepub fn dispatch_action(&self, event: DynamicActionEvent)
pub fn dispatch_action(&self, event: DynamicActionEvent)
Dispatches a DynamicActionEvent to all registered handlers and updates last_action + telemetry.
§Arguments
&Self- Hub reference.DynamicActionEvent- Action event emitted by a dynamic control.